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

This commit is contained in:
racham@netscape.com
2000-02-03 06:36:50 +00:00
parent 7b9128f39c
commit 969de4637d
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;
}