Commit 342b5a86 authored by Guy L. Albertelli's avatar Guy L. Albertelli Committed by Alexandre Julliard

Prevent bomb when GDI_ObjPtr returns null object.

parent 92bb19fe
......@@ -595,8 +595,14 @@ Pixmap X11DRV_BITMAP_Pixmap(HBITMAP hbitmap)
{
Pixmap pixmap;
BITMAPOBJ *bmp = (BITMAPOBJ *) GDI_GetObjPtr( hbitmap, BITMAP_MAGIC );
pixmap = (Pixmap)bmp->physBitmap;
GDI_ReleaseObj( hbitmap );
if (bmp) {
pixmap = (Pixmap)bmp->physBitmap;
GDI_ReleaseObj( hbitmap );
}
else {
ERR("handle %08x returned no obj\n", hbitmap);
pixmap = 0;
}
return pixmap;
}
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