Kaydet (Commit) af53581c authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#3028 check bitmap creation for failure

Change-Id: I8c1a2c3873e53153564a5aabc4cc8903622cf054
üst 3d37e106
......@@ -1152,7 +1152,13 @@ SalBitmap* SvpSalGraphics::getBitmap( long nX, long nY, long nWidth, long nHeigh
aPal[0] = Color(COL_BLACK);
aPal[1] = Color(COL_WHITE);
}
pBitmap->Create(Size(nWidth, nHeight), GetBitCount(), aPal);
if (!pBitmap->Create(Size(nWidth, nHeight), GetBitCount(), aPal))
{
SAL_WARN("vcl.gdi", "SvpSalGraphics::getBitmap, cannot create bitmap");
delete pBitmap;
return nullptr;
}
cairo_surface_t* target = SvpSalGraphics::createCairoSurface(pBitmap->GetBuffer());
cairo_t* cr = cairo_create(target);
......
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