Check whether entry is null

This fixes the crash in #7877.
This commit is contained in:
Cheng Zhao 2015-07-29 18:26:20 +08:00
parent 046a8e8a08
commit 643ed27fd4

View file

@ -549,7 +549,7 @@ void NativeWindow::BeforeUnloadDialogCancelled() {
void NativeWindow::TitleWasSet(content::NavigationEntry* entry, void NativeWindow::TitleWasSet(content::NavigationEntry* entry,
bool explicit_set) { bool explicit_set) {
bool prevent_default = false; bool prevent_default = false;
std::string text = base::UTF16ToUTF8(entry->GetTitle()); std::string text = entry ? base::UTF16ToUTF8(entry->GetTitle()) : "";
FOR_EACH_OBSERVER(NativeWindowObserver, FOR_EACH_OBSERVER(NativeWindowObserver,
observers_, observers_,
OnPageTitleUpdated(&prevent_default, text)); OnPageTitleUpdated(&prevent_default, text));