Bug 775228. r=joe a=lsblakk
authorMatt Woodrow <mwoodrow@mozilla.com>
Thu, 25 Oct 2012 12:04:41 +1300
changeset 109715 b90097a377881f393deedd4291f58c2917c53d02
parent 109714 df94e6652a9d53ebe82e29f75855e6bed1bbe109
child 109716 5048c50f65ffdf6eb5285172d65eba64a3afbd10
push id1629
push usermwoodrow@mozilla.com
push dateMon, 29 Oct 2012 22:38:10 +0000
treeherdermozilla-beta@b90097a37788 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjoe, lsblakk
bugs775228
milestone17.0
Bug 775228. r=joe a=lsblakk
gfx/thebes/gfxQuartzSurface.cpp
--- a/gfx/thebes/gfxQuartzSurface.cpp
+++ b/gfx/thebes/gfxQuartzSurface.cpp
@@ -143,17 +143,17 @@ int32_t gfxQuartzSurface::GetDefaultCont
                gfxContext::FLAG_DISABLE_COPY_BACKGROUND;
 
     return 0;
 }
 
 already_AddRefed<gfxImageSurface> gfxQuartzSurface::GetAsImageSurface()
 {
     cairo_surface_t *surface = cairo_quartz_surface_get_image(mSurface);
-    if (!surface)
+    if (!surface || cairo_surface_status(surface))
         return nullptr;
 
     nsRefPtr<gfxASurface> img = Wrap(surface);
 
     // cairo_quartz_surface_get_image returns a referenced image, and thebes
     // shares the refcounts of Cairo surfaces. However, Wrap also adds a
     // reference to the image. We need to remove one of these references
     // explicitly so we don't leak.