diff --git a/mozilla/docshell/base/nsWebShell.cpp b/mozilla/docshell/base/nsWebShell.cpp index ee0f4f3a46c..e3b205c3afa 100644 --- a/mozilla/docshell/base/nsWebShell.cpp +++ b/mozilla/docshell/base/nsWebShell.cpp @@ -4135,8 +4135,8 @@ NS_IMETHODIMP nsWebShell::SetTitle(const PRUnichar* aTitle) // Oh this hack sucks. But there isn't any other way that I can // reliably get the title text. Sorry. nsCOMPtr globalHistory(do_GetService("component://netscape/browser/global-history")); - NS_ENSURE_TRUE(globalHistory, NS_ERROR_FAILURE); - globalHistory->SetPageTitle(nsCAutoString(mURL), aTitle); + if (globalHistory) + globalHistory->SetPageTitle(nsCAutoString(mURL), aTitle); return NS_OK; } diff --git a/mozilla/webshell/src/nsWebShell.cpp b/mozilla/webshell/src/nsWebShell.cpp index ee0f4f3a46c..e3b205c3afa 100644 --- a/mozilla/webshell/src/nsWebShell.cpp +++ b/mozilla/webshell/src/nsWebShell.cpp @@ -4135,8 +4135,8 @@ NS_IMETHODIMP nsWebShell::SetTitle(const PRUnichar* aTitle) // Oh this hack sucks. But there isn't any other way that I can // reliably get the title text. Sorry. nsCOMPtr globalHistory(do_GetService("component://netscape/browser/global-history")); - NS_ENSURE_TRUE(globalHistory, NS_ERROR_FAILURE); - globalHistory->SetPageTitle(nsCAutoString(mURL), aTitle); + if (globalHistory) + globalHistory->SetPageTitle(nsCAutoString(mURL), aTitle); return NS_OK; }