Mike McCormack : riched20: Don't crash if a colour isn't found.
Module: wine Branch: master Commit: 9eda99c0bb064ead14ece835a75bd8df5f76e63d URL: http://source.winehq.org/git/wine.git/?a=commit;h=9eda99c0bb064ead14ece835a7... Author: Mike McCormack <mike(a)codeweavers.com> Date: Mon Oct 9 20:11:32 2006 +0900 riched20: Don't crash if a colour isn't found. --- dlls/riched20/editor.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c index e3383f2..e0ba4e9 100644 --- a/dlls/riched20/editor.c +++ b/dlls/riched20/editor.c @@ -377,7 +377,10 @@ static void ME_RTFCharAttrHook(RTF_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:
participants (1)
-
Alexandre Julliard