Bug 690235 - Fix Mac builds with clang caused by bug 666414 not catching the stupidness of gcc4.2 (see bug 689397); r=ehsan

--HG--
extra : rebase_source : ac24c47e2885476593985c88a503e4f075602582
This commit is contained in:
Rafael Ávila de Espíndola 2011-09-29 10:56:57 -04:00
parent 8bb33dc7e1
commit 34dacf8f22

View File

@ -154,9 +154,10 @@ already_AddRefed<gfxImageSurface> gfxQuartzSurface::GetAsImageSurface()
// shares the refcounts of Cairo surfaces. However, Wrap also adds a // shares the refcounts of Cairo surfaces. However, Wrap also adds a
// reference to the image. We need to remove one of these references // reference to the image. We need to remove one of these references
// explicitly so we don't leak. // explicitly so we don't leak.
img->Release(); gfxImageSurface* imgSurface = static_cast<gfxImageSurface*> (img.forget().get());
imgSurface->Release();
return static_cast<gfxImageSurface*>(img.forget().get()); return imgSurface;
} }
gfxQuartzSurface::~gfxQuartzSurface() gfxQuartzSurface::~gfxQuartzSurface()