Commit 4cf9dd3d authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

If the dibsection is based on a file-mapping object, then make sure

that the section is in sync when the dibsection is deleted.
parent 3e481321
......@@ -419,11 +419,11 @@ BOOL X11DRV_DeleteBitmap( HBITMAP hbitmap )
BITMAPOBJ *bmp = (BITMAPOBJ *) GDI_GetObjPtr( hbitmap, BITMAP_MAGIC );
if (bmp)
{
if (bmp->dib) X11DRV_DIB_DeleteDIBSection( bmp );
wine_tsx11_lock();
if (bmp->physBitmap) XFreePixmap( gdi_display, (Pixmap)bmp->physBitmap );
bmp->physBitmap = NULL;
wine_tsx11_unlock();
if (bmp->dib) X11DRV_DIB_DeleteDIBSection( bmp );
GDI_ReleaseObj( hbitmap );
}
return TRUE;
......
......@@ -4884,6 +4884,9 @@ void X11DRV_DIB_DeleteDIBSection(BITMAPOBJ *bmp)
{
X11DRV_DIBSECTION *dib = (X11DRV_DIBSECTION *) bmp->dib;
if (dib->dibSection.dshSection)
X11DRV_DIB_Coerce(bmp, DIB_Status_InSync, FALSE);
if (dib->image)
{
wine_tsx11_lock();
......
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