diff --git a/src/apps/webpositive/BrowserWindow.cpp b/src/apps/webpositive/BrowserWindow.cpp index c8369b2af1..4a4be2ba93 100644 --- a/src/apps/webpositive/BrowserWindow.cpp +++ b/src/apps/webpositive/BrowserWindow.cpp @@ -1228,12 +1228,9 @@ BrowserWindow::_TabChanged(int32 index) SetCurrentWebView(webView); - if (webView) - _UpdateTitle(webView->MainFrameTitle()); - else - _UpdateTitle(""); - if (webView) { + _UpdateTitle(webView->MainFrameTitle()); + PageUserData* userData = static_cast( webView->GetUserData()); if (userData && userData->FocusedView() != NULL) @@ -1245,7 +1242,8 @@ BrowserWindow::_TabChanged(int32 index) // Trigger update of the interface to the new page, by requesting // to resend all notifications. webView->WebPage()->ResendNotifications(); - } + } else + _UpdateTitle(""); }