riched20: Don't crash if a colour isn't found.

This commit is contained in:
Mike McCormack 2006-10-09 20:11:32 +09:00 committed by Alexandre Julliard
parent 8b9ad4d3bc
commit 9eda99c0bb
1 changed files with 4 additions and 1 deletions

View File

@ -377,7 +377,10 @@ static void ME_RTFCharAttrHook(RTF_Info *info)
else if (info->rtfParam != rtfNoParam)
{
RTFColor *c = RTFGetColor(info, info->rtfParam);
fmt.crTextColor = (c->rtfCBlue<<16)|(c->rtfCGreen<<8)|(c->rtfCRed);
if (c)
fmt.crTextColor = (c->rtfCBlue<<16)|(c->rtfCGreen<<8)|(c->rtfCRed);
else
fmt.crTextColor = 0;
}
break;
case rtfFontNum: