mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1230929 - modified the logic in order to prvent null pointer dereference. r=jmuizelaar
This commit is contained in:
parent
5618fa2eef
commit
e672896cef
@ -208,9 +208,10 @@ void
|
||||
gfxASurface::Init(cairo_surface_t* surface, bool existingSurface)
|
||||
{
|
||||
SetSurfaceWrapper(surface, this);
|
||||
MOZ_ASSERT(surface, "surface should be a valid pointer");
|
||||
|
||||
mSurface = surface;
|
||||
mSurfaceValid = surface && !cairo_surface_status(surface);
|
||||
mSurfaceValid = !cairo_surface_status(surface);
|
||||
if (!mSurfaceValid) {
|
||||
gfxWarning() << "ASurface Init failed with Cairo status " << cairo_surface_status(surface) << " on " << hexa(surface);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user