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

that the section is in sync when the dibsection is deleted.
This commit is contained in:
Huw Davies 2005-03-01 10:43:19 +00:00 committed by Alexandre Julliard
parent 3e4813214b
commit 4cf9dd3d47
2 changed files with 4 additions and 1 deletions

View File

@ -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;

View File

@ -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();