diff --git a/src/apps/webpositive/BrowserWindow.cpp b/src/apps/webpositive/BrowserWindow.cpp index a5d8fa2671..c8369b2af1 100644 --- a/src/apps/webpositive/BrowserWindow.cpp +++ b/src/apps/webpositive/BrowserWindow.cpp @@ -1228,17 +1228,19 @@ BrowserWindow::_TabChanged(int32 index) SetCurrentWebView(webView); - PageUserData* userData = static_cast(webView->GetUserData()); - if (userData) - userData->FocusedView()->MakeFocus(true); - else - webView->MakeFocus(true); - if (webView) _UpdateTitle(webView->MainFrameTitle()); else _UpdateTitle(""); + if (webView) { + PageUserData* userData = static_cast( + webView->GetUserData()); + if (userData && userData->FocusedView() != NULL) + userData->FocusedView()->MakeFocus(true); + else + webView->MakeFocus(true); + fURLTextControl->SetText(webView->MainFrameURL()); // Trigger update of the interface to the new page, by requesting // to resend all notifications.