riched20: Handle cp NULL more gracefully (Coverity).

oldstable
Marcus Meissner 2009-01-29 09:49:05 +01:00 committed by Alexandre Julliard
parent 3d8fd826e1
commit 9eb4c73ae3
1 changed files with 3 additions and 1 deletions

View File

@ -1044,8 +1044,10 @@ static void ReadColorTbl(RTF_Info *info)
}
cp = New (RTFColor);
if (cp == NULL)
if (cp == NULL) {
ERR ( "%s: cannot allocate color entry\n", fn);
break;
}
cp->rtfCNum = cnum++;
cp->rtfCRed = cp->rtfCGreen = cp->rtfCBlue = -1;
cp->rtfNextColor = info->colorList;