make nsRenderingContextXlib::CreateDrawingSurface always call

UpdateGC. Bug 114334, patch from Roland Mainz
<Roland.Mainz@informatik.med.uni-giessen.de>, r=timeless, sr=kin
This commit is contained in:
bzbarsky%mit.edu 2001-12-11 02:53:03 +00:00
Родитель d58691b835
Коммит 3de82c1040
1 изменённых файлов: 9 добавлений и 9 удалений

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

@ -675,22 +675,22 @@ nsRenderingContextXlib::CreateDrawingSurface(nsRect *aBounds, PRUint32 aSurfFlag
aSurface = nsnull;
return NS_ERROR_FAILURE;
}
NS_ENSURE_TRUE(aBounds != nsnull, NS_ERROR_FAILURE);
NS_ENSURE_TRUE((aBounds->width > 0) && (aBounds->height > 0), NS_ERROR_FAILURE);
nsresult rv = NS_ERROR_FAILURE;
nsDrawingSurfaceXlibImpl *surf = new nsDrawingSurfaceXlibImpl();
if (surf) {
NS_ADDREF(surf);
if (!mGC)
UpdateGC();
surf->Init(mXlibRgbHandle,
mGC,
aBounds->width,
aBounds->height,
aSurfFlags);
UpdateGC();
rv = surf->Init(mXlibRgbHandle, mGC, aBounds->width, aBounds->height, aSurfFlags);
}
aSurface = (nsDrawingSurface)surf;
return NS_OK;
return rv;
}
NS_IMETHODIMP