From 1d96f8cb327186f0727ab7d393cc89db508d2070 Mon Sep 17 00:00:00 2001 From: "sfraser%netscape.com" Date: Wed, 16 Dec 1998 03:37:56 +0000 Subject: [PATCH] Assert on a null widget Ptr --- view/src/nsView.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/view/src/nsView.cpp b/view/src/nsView.cpp index 3670bec54ab..418dfac4da8 100644 --- a/view/src/nsView.cpp +++ b/view/src/nsView.cpp @@ -175,6 +175,8 @@ nsIView* nsView::GetViewFor(nsIWidget* aWidget) nsIView* view = nsnull; void* clientData; + NS_PRECONDITION(nsnull != aWidget, "null widget ptr"); + // The widget's client data points back to the owning view if (NS_SUCCEEDED(aWidget->GetClientData(clientData))) { view = (nsIView*)clientData;