Modified nsRegionWin::Init to allow for init to be called multiple times on the same instance without leaking HRGN handles. The view manager re-uses nsIRegions by calling Init on an existing instance. bug=19114; r=buster@netscape.com

This commit is contained in:
kmcclusk%netscape.com 1999-12-06 21:33:59 +00:00
Родитель bcc9cef6bd
Коммит 670cd92de5
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -58,6 +58,10 @@ NS_IMPL_RELEASE(nsRegionWin)
nsresult nsRegionWin :: Init(void)
{
if (NULL != mRegion) {
::DeleteObject(mRegion);
FreeRects(nsnull);
}
mRegion = ::CreateRectRgn(0, 0, 0, 0);
mRegionType = NULLREGION;