In BrowserWindow::_TabChanged(), the BWebView could be NULL. Also check if there

is a focused view set at all.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@398 94f232f2-1747-11df-bad5-a5bfde151594
This commit is contained in:
stippi 2010-04-07 12:46:39 +00:00 committed by Alexandre Deckner
parent 845ec8e102
commit 8061d9ebff

View File

@ -1228,17 +1228,19 @@ BrowserWindow::_TabChanged(int32 index)
SetCurrentWebView(webView);
PageUserData* userData = static_cast<PageUserData*>(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<PageUserData*>(
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.