b=403481 followup; do the right cleanup in some error conditions; r=stuart

This commit is contained in:
vladimir%pobox.com 2007-11-27 01:40:03 +00:00
Родитель 77aefc6f02
Коммит 5741f8e9cd
1 изменённых файлов: 2 добавлений и 3 удалений

Просмотреть файл

@ -108,7 +108,7 @@ already_AddRefed<gfxASurface>
gfxPlatformGtk::CreateOffscreenSurface(const gfxIntSize& size,
gfxASurface::gfxImageFormat imageFormat)
{
gfxASurface *newSurface = nsnull;
nsRefPtr<gfxASurface> newSurface = nsnull;
int glitzf;
int xrenderFormatID;
@ -222,8 +222,7 @@ gfxPlatformGtk::CreateOffscreenSurface(const gfxIntSize& size,
#endif
}
NS_IF_ADDREF(newSurface);
return newSurface;
return newSurface.forget();
}
nsresult