Kaydet (Commit) b1272359 authored tarafından Oliver-Rainer Wittmann's avatar Oliver-Rainer Wittmann

125000: <WinSalBitmap::ImplCreateGdiPlusBitmap()> - check last status of newly…

125000: <WinSalBitmap::ImplCreateGdiPlusBitmap()> - check last status of newly created <Gdiplus::Bitmap> instance before using it.
üst 35f3ceaf
......@@ -309,6 +309,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));
......@@ -329,6 +331,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