Commit 83e95a60 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

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

parent 8adca327
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment