diff --git a/dlls/winex11.drv/dib.c b/dlls/winex11.drv/dib.c index fc71c24..954e6e7 100644 --- a/dlls/winex11.drv/dib.c +++ b/dlls/winex11.drv/dib.c @@ -39,6 +39,7 @@ #include "wingdi.h" #include "x11drv.h" #include "excpt.h" +#include "wine/exception.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(bitmap); @@ -3569,11 +3570,19 @@ static int X11DRV_DIB_SetImageBits( const X11DRV_DIB_IMAGEBITS_DESCR *descr ) bmpImage, descr->dibpitch); break; case 24: +/* Buggy MFC-funtion can cause a crash here. See bug #7380 for more info */ +__TRY + { X11DRV_DIB_SetImageBits_24( descr->lines, descr->bits, descr->infoWidth, descr->width, descr->xSrc, descr->physDev, descr->rMask, descr->gMask, descr->bMask, bmpImage, descr->dibpitch); + } +__EXCEPT_PAGE_FAULT + { + lines = 0; + } __ENDTRY break; case 32: X11DRV_DIB_SetImageBits_32( descr->lines, descr->bits,