Resolves: #i125000# check last status of newly created...
<Gdiplus::Bitmap> instance before using it. (cherry picked from commit b127235917610b9c68e19df29bb39af496906569) Change-Id: I97364cf963424b0e8d0b52b3c995bd4defdca067
This commit is contained in:
committed by
Caolán McNamara
parent
a10a621b48
commit
adb1bb21f8
@@ -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)
|
||||
|
Reference in New Issue
Block a user