Trying to access the global history prematurely in putting up the profile dialogues. Removing assertion and adding check on null pointer. r=travis

git-svn-id: svn://10.0.0.236/trunk@59626 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
racham%netscape.com
2000-02-03 06:36:50 +00:00
parent ab32ef25c1
commit c20d4dc2d3
2 changed files with 4 additions and 4 deletions

View File

@@ -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<nsIGlobalHistory> 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;
}