diff --git a/dlls/winex11.drv/dib.c b/dlls/winex11.drv/dib.c index a95783e..d3cb0dd 100644 --- a/dlls/winex11.drv/dib.c +++ b/dlls/winex11.drv/dib.c @@ -40,6 +40,7 @@ #include "wingdi.h" #include "x11drv.h" #include "excpt.h" +#include "wine/exception.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(bitmap); @@ -3527,6 +3528,9 @@ static int X11DRV_DIB_SetImageBits( const X11DRV_DIB_IMAGEBITS_DESCR *descr ) bmpImage->depth,bmpImage->bits_per_pixel, bmpImage->red_mask,bmpImage->green_mask,bmpImage->blue_mask); +/* Buggy MFC-funtion can cause a crash here. See bug #7380 for more info */ +__TRY + { /* Transfer the pixels */ switch(descr->infoBpp) { @@ -3587,6 +3591,11 @@ static int X11DRV_DIB_SetImageBits( const X11DRV_DIB_IMAGEBITS_DESCR *descr ) WARN("(%d): Invalid depth\n", descr->infoBpp ); break; } + } /*End of __TRY */ +__EXCEPT_PAGE_FAULT + { + lines = 0; + } __ENDTRY TRACE("XPutImage(%ld,%p,%p,%d,%d,%d,%d,%d,%d)\n", descr->drawable, descr->gc, bmpImage,