Skip to content
Snippets Groups Projects
Commit 342b5a86 authored by Guy Albertelli's avatar Guy Albertelli Committed by Alexandre Julliard
Browse files

Prevent bomb when GDI_ObjPtr returns null object.

parent 92bb19fe
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment