riched20: Handle more missing allocs gracefully (Coverity).

This commit is contained in:
Marcus Meissner 2009-01-29 09:51:05 +01:00 committed by Alexandre Julliard
parent 605a40e477
commit a09621b00f

View file

@ -219,8 +219,10 @@ void RTFInit(RTF_Info *info)
{
info->rtfTextBuf = heap_alloc (rtfBufSiz);
info->pushedTextBuf = heap_alloc (rtfBufSiz);
if (info->rtfTextBuf == NULL || info->pushedTextBuf == NULL)
if (info->rtfTextBuf == NULL || info->pushedTextBuf == NULL) {
ERR ("Cannot allocate text buffers.\n");
return;
}
info->rtfTextBuf[0] = info->pushedTextBuf[0] = '\0';
}