Module: wine Branch: master Commit: c8d61899dbb3e8930881a212943d368e8390b8c5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=c8d61899dbb3e8930881a21294...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Sat Aug 18 02:09:17 2012 +0900
gdi32: Make sure that pattern info is initialized before being used.
---
dlls/gdi32/dibdrv/objects.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/gdi32/dibdrv/objects.c b/dlls/gdi32/dibdrv/objects.c index 4712dc1..98bbb91 100644 --- a/dlls/gdi32/dibdrv/objects.c +++ b/dlls/gdi32/dibdrv/objects.c @@ -1897,9 +1897,6 @@ static BOOL select_pattern_brush( dibdrv_physdev *pdev, dib_brush *brush, BOOL * dib_info pattern; BOOL dither = (brush->dib.bit_count == 1);
- if (pattern.bit_count == 1 && !pattern.color_table) - dither = FALSE; /* monochrome DDB pattern brushes don't get dithered */ - if (brush->pattern.info->bmiHeader.biClrUsed && brush->pattern.usage == DIB_PAL_COLORS) { copy_bitmapinfo( info, brush->pattern.info ); @@ -1912,6 +1909,9 @@ static BOOL select_pattern_brush( dibdrv_physdev *pdev, dib_brush *brush, BOOL * init_dib_info_from_bitmapinfo( &pattern, brush->pattern.info, brush->pattern.bits.ptr ); }
+ if (pattern.bit_count == 1 && !pattern.color_table) + dither = FALSE; /* monochrome DDB pattern brushes don't get dithered */ + if (pattern.bit_count == 1 && !pattern.color_table && (pdev->dib.bit_count != 1 || pdev->dib.color_table)) {