Fix for 2161 -- if nsView::GetViewFor() is called with a null widget, just return a null view.

This commit is contained in:
sfraser%netscape.com 1999-01-08 21:31:56 +00:00
parent d798c3e079
commit 6b37d2bc99

View File

@ -178,7 +178,7 @@ nsIView* nsView::GetViewFor(nsIWidget* aWidget)
NS_PRECONDITION(nsnull != aWidget, "null widget ptr");
// The widget's client data points back to the owning view
if (NS_SUCCEEDED(aWidget->GetClientData(clientData))) {
if (aWidget && NS_SUCCEEDED(aWidget->GetClientData(clientData))) {
view = (nsIView*)clientData;
if (nsnull != view) {