From bca5e6cf279267c83bbb1d9c74def55cfc0ceaef Mon Sep 17 00:00:00 2001 From: "wr%rosenauer.org" Date: Thu, 24 Aug 2006 05:09:35 +0000 Subject: [PATCH] Bug 349726 - fixed crash in nsHTMLCSSUtils::GetDefaultViewCSS, r=timeless, sr=neil git-svn-id: svn://10.0.0.236/trunk@208284 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/editor/libeditor/html/nsHTMLCSSUtils.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/mozilla/editor/libeditor/html/nsHTMLCSSUtils.cpp b/mozilla/editor/libeditor/html/nsHTMLCSSUtils.cpp index 41db1504317..cf598bdda6c 100644 --- a/mozilla/editor/libeditor/html/nsHTMLCSSUtils.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLCSSUtils.cpp @@ -615,9 +615,11 @@ nsHTMLCSSUtils::GetDefaultViewCSS(nsIDOMNode *aNode, nsIDOMViewCSS **aViewCSS) // from the document, get the abtractView res = documentView->GetDefaultView(getter_AddRefs(abstractView)); if (NS_FAILED(res)) return res; - // from the abstractView, get the CSS view - CallQueryInterface(abstractView, aViewCSS); - return NS_OK; + if (abstractView) { + // from the abstractView, get the CSS view + CallQueryInterface(abstractView, aViewCSS); + return NS_OK; + } } } *aViewCSS = nsnull;