Commit d982a71b authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

Don't HeapFree() colormap if we didn't allocate one.

parent 9cfe2d53
......@@ -1280,7 +1280,8 @@ INT32 WINAPI SetDIBits32( HDC32 hdc, HBITMAP32 hbitmap, UINT32 startscan,
GDI_HEAP_UNLOCK( hdc );
return 0;
}
}
} else
descr.colorMap = 0;
/* HACK for now */
if(!bmp->DDBitmap)
......@@ -1306,7 +1307,7 @@ INT32 WINAPI SetDIBits32( HDC32 hdc, HBITMAP32 hbitmap, UINT32 startscan,
result = CALL_LARGE_STACK( DIB_SetImageBits, &descr );
LeaveCriticalSection( &X11DRV_CritSection );
HeapFree(GetProcessHeap(), 0, descr.colorMap);
if (descr.colorMap) HeapFree(GetProcessHeap(), 0, descr.colorMap);
GDI_HEAP_UNLOCK( hdc );
GDI_HEAP_UNLOCK( hbitmap );
......
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