riched20: Don't crash if a colour isn't found.
This commit is contained in:
parent
8b9ad4d3bc
commit
9eda99c0bb
@ -377,7 +377,10 @@ static void ME_RTFCharAttrHook(RTF_Info *info)
|
|||||||
else if (info->rtfParam != rtfNoParam)
|
else if (info->rtfParam != rtfNoParam)
|
||||||
{
|
{
|
||||||
RTFColor *c = RTFGetColor(info, info->rtfParam);
|
RTFColor *c = RTFGetColor(info, info->rtfParam);
|
||||||
|
if (c)
|
||||||
fmt.crTextColor = (c->rtfCBlue<<16)|(c->rtfCGreen<<8)|(c->rtfCRed);
|
fmt.crTextColor = (c->rtfCBlue<<16)|(c->rtfCGreen<<8)|(c->rtfCRed);
|
||||||
|
else
|
||||||
|
fmt.crTextColor = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case rtfFontNum:
|
case rtfFontNum:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user