From 62673e8a9e475334817e16890a38312429ae2d66 Mon Sep 17 00:00:00 2001 From: "anthonyd%netscape.com" Date: Fri, 13 Oct 2000 05:06:02 +0000 Subject: [PATCH] fix for bug # 55750 Crash opening "new composer window" to bogus location, after "this type of page can't be edited" dialog r=sfraser sr=kin sr=rpotts git-svn-id: svn://10.0.0.236/trunk@81114 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsWebShell.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index 607d8924b22..97598c4bb0a 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -1001,8 +1001,11 @@ nsWebShell::OnEndDocumentLoad(nsIDocumentLoader* loader, aStatus == NS_ERROR_NET_TIMEOUT) { PRBool keywordsEnabled = PR_FALSE; - NS_ENSURE_SUCCESS(mPrefs->GetBoolPref("keyword.enabled", &keywordsEnabled), - NS_ERROR_FAILURE); + if(mPrefs) + { + NS_ENSURE_SUCCESS(mPrefs->GetBoolPref("keyword.enabled", &keywordsEnabled), + NS_ERROR_FAILURE); + } // we should only perform a keyword search under the following conditions: // (0) Pref keyword.enabled is true