diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index 1acddf02c5d..6264e435d77 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -3100,10 +3100,11 @@ nsDocShell::SetTitle(const PRUnichar * aTitle) nsCOMPtr hEntry; mSessionHistory->GetEntryAtIndex(index, PR_FALSE, getter_AddRefs(hEntry)); - NS_ENSURE_TRUE(hEntry, NS_ERROR_FAILURE); - nsCOMPtr shEntry(do_QueryInterface(hEntry)); - if (shEntry) + if (hEntry) { + nsCOMPtr shEntry(do_QueryInterface(hEntry)); + if (shEntry) shEntry->SetTitle(mTitle.get()); + } }