Prevent bomb when GDI_ObjPtr returns null object.
This commit is contained in:
parent
92bb19fed8
commit
342b5a861a
|
@ -595,8 +595,14 @@ Pixmap X11DRV_BITMAP_Pixmap(HBITMAP hbitmap)
|
||||||
{
|
{
|
||||||
Pixmap pixmap;
|
Pixmap pixmap;
|
||||||
BITMAPOBJ *bmp = (BITMAPOBJ *) GDI_GetObjPtr( hbitmap, BITMAP_MAGIC );
|
BITMAPOBJ *bmp = (BITMAPOBJ *) GDI_GetObjPtr( hbitmap, BITMAP_MAGIC );
|
||||||
pixmap = (Pixmap)bmp->physBitmap;
|
if (bmp) {
|
||||||
GDI_ReleaseObj( hbitmap );
|
pixmap = (Pixmap)bmp->physBitmap;
|
||||||
|
GDI_ReleaseObj( hbitmap );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ERR("handle %08x returned no obj\n", hbitmap);
|
||||||
|
pixmap = 0;
|
||||||
|
}
|
||||||
return pixmap;
|
return pixmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue