Bug 924679. Part 1: Band-aid robustness fix. r=mattwoodrow

--HG--
extra : rebase_source : fee33a1412e123adb2fbd91221684c1ece8d8b86
This commit is contained in:
Robert O'Callahan 2013-10-25 23:25:39 +02:00
parent 4ddd9b2de8
commit ead38893c1

View File

@ -864,7 +864,9 @@ gfxPlatform::GetThebesSurfaceForDrawTarget(DrawTarget *aTarget)
if (aTarget->GetType() == BACKEND_CAIRO) {
cairo_surface_t* csurf =
static_cast<cairo_surface_t*>(aTarget->GetNativeSurface(NATIVE_SURFACE_CAIRO_SURFACE));
return gfxASurface::Wrap(csurf);
if (csurf) {
return gfxASurface::Wrap(csurf);
}
}
// The semantics of this part of the function are sort of weird. If we