Kaydet (Commit) adb1bb21 authored tarafından Oliver-Rainer Wittmann's avatar Oliver-Rainer Wittmann Kaydeden (comit) Caolán McNamara

Resolves: #i125000# check last status of newly created...

<Gdiplus::Bitmap> instance before using it.

(cherry picked from commit b1272359)

Change-Id: I97364cf963424b0e8d0b52b3c995bd4defdca067
üst a10a621b
......@@ -316,6 +316,8 @@ Gdiplus::Bitmap* WinSalBitmap::ImplCreateGdiPlusBitmap()
pRetval = new Gdiplus::Bitmap(nW, nH, PixelFormat24bppRGB);
if(pRetval)
{
if ( pRetval->GetLastStatus() == Gdiplus::Ok )
{
sal_uInt8* pSrcRGB(pRGB->mpBits);
const sal_uInt32 nExtraRGB(pRGB->mnScanlineSize - (nW * 3));
......@@ -336,6 +338,12 @@ Gdiplus::Bitmap* WinSalBitmap::ImplCreateGdiPlusBitmap()
pRetval->UnlockBits(&aGdiPlusBitmapData);
}
else
{
delete pRetval;
pRetval = NULL;
}
}
}
if(pExtraRGB)
......
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