Added additional check if source bitmap is valid in wxCairoRenderer::CreateSubBitmap.
Check if source bitmap contains Cairo surface.
This commit is contained in:
parent
cce6f4edaa
commit
ab891932cd
@ -2818,6 +2818,8 @@ wxCairoRenderer::CreateSubBitmap(const wxGraphicsBitmap& bitmap,
|
||||
|
||||
wxCairoBitmapData* dataSrc = static_cast<wxCairoBitmapData*>(bitmap.GetRefData());
|
||||
cairo_surface_t* srcSurface = dataSrc->GetCairoSurface();
|
||||
wxCHECK_MSG(srcSurface, wxNullGraphicsBitmap, wxS("Invalid bitmap"));
|
||||
|
||||
int srcWidth = cairo_image_surface_get_width(srcSurface);
|
||||
int srcHeight = cairo_image_surface_get_height(srcSurface);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user