winex11: Check for failure to convert the brush bitmap to X11.

This commit is contained in:
Alexandre Julliard 2012-01-27 11:10:38 +01:00
parent b5314f50ed
commit 8eb9ab531f
1 changed files with 5 additions and 0 deletions

View File

@ -269,6 +269,11 @@ HBITMAP create_brush_bitmap( X11DRV_PDEVICE *physDev, const struct brush_pattern
memdc = CreateCompatibleDC( physDev->dev.hdc );
SelectObject( memdc, bitmap );
DeleteDC( memdc );
if (!X11DRV_get_phys_bitmap( bitmap ))
{
DeleteObject( bitmap );
return 0;
}
SetDIBits( physDev->dev.hdc, bitmap, 0, abs(info->bmiHeader.biHeight),
pattern->bits.ptr, info, pattern->usage );