From eecbb3483bf153852773f34ef7ebb31832153c11 Mon Sep 17 00:00:00 2001 From: "mats.palmgren%bredband.net" Date: Sun, 1 Jul 2007 15:19:08 +0000 Subject: [PATCH] Fix GCC build error. b=363592 r=mkaply sr=benjamin a=dveditz git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@229094 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/gfx/src/windows/nsImageWin.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mozilla/gfx/src/windows/nsImageWin.cpp b/mozilla/gfx/src/windows/nsImageWin.cpp index 5ff48b4a696..7143f76a65a 100644 --- a/mozilla/gfx/src/windows/nsImageWin.cpp +++ b/mozilla/gfx/src/windows/nsImageWin.cpp @@ -2046,12 +2046,15 @@ CompositeBitsInMemory(HDC aTheHDC, int aDX, int aDY, int aDWidth, int aDHeight, ::GdiFlush(); // output the composed image +#ifdef _MSC_VER __try { +#endif ::StretchDIBits(aTheHDC, aDX, aDY, aDWidth, aDHeight, aSX, aSrcy, aSWidth, aSHeight, screenBits, (LPBITMAPINFO)&offbmi, 256 == aNumPaletteColors ? DIB_PAL_COLORS : DIB_RGB_COLORS, SRCCOPY); +#ifdef _MSC_VER } __except (EXCEPTION_EXECUTE_HANDLER) { /* yeah this is ugly - certain printer drivers crash in the StretchDIBits */ /* workaround is to subtract one from aSrcy */ @@ -2061,6 +2064,7 @@ CompositeBitsInMemory(HDC aTheHDC, int aDX, int aDY, int aDWidth, int aDHeight, 256 == aNumPaletteColors ? DIB_PAL_COLORS : DIB_RGB_COLORS, SRCCOPY); } +#endif ::SelectObject(memDC, oldBitmap); }