hail mary bulletproofing fix for #10035

This commit is contained in:
sspitzer%netscape.com 1999-07-19 19:57:30 +00:00
parent d752334449
commit 0b33172e2b

View File

@ -76,6 +76,7 @@ nsView :: nsView()
mXForm = nsnull;
mVFlags = 0;
mOpacity = 1.0f;
mViewManager = nsnull;
}
nsView :: ~nsView()
@ -955,7 +956,13 @@ NS_IMETHODIMP nsView :: SetBounds(nscoord aX, nscoord aY, nscoord aWidth, nscoor
NS_IMETHODIMP nsView :: GetBounds(nsRect &aBounds) const
{
nsIView *rootView;
nsIView *rootView = nsnull;
NS_ASSERTION(mViewManager, "mViewManager is null!");
if (!mViewManager) {
aBounds.x = aBounds.y = 0;
return NS_ERROR_FAILURE;
}
mViewManager->GetRootView(rootView);
aBounds = mBounds;