gdiplus: Fix a possible NULL pointer reference in GdipGetNearestColor().

Fix a regression from 5ca9da2c01.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48657
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zhiyi Zhang 2020-02-24 11:06:16 +08:00 committed by Alexandre Julliard
parent 8adca32727
commit 83e95a609c
1 changed files with 1 additions and 1 deletions

View File

@ -4783,7 +4783,7 @@ GpStatus WINGDIPAPI GdipGetNearestColor(GpGraphics *graphics, ARGB* argb)
if(graphics->busy)
return ObjectBusy;
if (graphics->image->type == ImageTypeBitmap)
if (graphics->image && graphics->image->type == ImageTypeBitmap)
{
static int once;
GpBitmap *bitmap = (GpBitmap *)graphics->image;