riched20: Check for NULL in rtf reader (Coverity).

This commit is contained in:
Marcus Meissner 2009-12-03 00:33:02 +01:00 committed by Alexandre Julliard
parent 40026a7eb7
commit c848e4ee86
1 changed files with 3 additions and 0 deletions

View File

@ -1109,7 +1109,10 @@ static void ReadStyleSheet(RTF_Info *info)
}
sep = New (RTFStyleElt);
if (sep == NULL)
{
ERR ( "%s: cannot allocate style element\n", fn);
break;
}
sep->rtfSEClass = info->rtfClass;
sep->rtfSEMajor = info->rtfMajor;
sep->rtfSEMinor = info->rtfMinor;