riched20: Exit the loop instead of crashing (Coverity).

This commit is contained in:
Marcus Meissner 2009-01-29 09:42:33 +01:00 committed by Alexandre Julliard
parent 4662271afd
commit 3d8fd826e1
1 changed files with 3 additions and 1 deletions

View File

@ -1090,8 +1090,10 @@ static void ReadStyleSheet(RTF_Info *info)
if (RTFCheckCM (info, rtfGroup, rtfEndGroup))
break;
sp = New (RTFStyle);
if (sp == NULL)
if (sp == NULL) {
ERR ( "%s: cannot allocate stylesheet entry\n", fn);
break;
}
sp->rtfSName = NULL;
sp->rtfSNum = -1;
sp->rtfSType = rtfParStyle;