Fix #10902 Terminal crashes setting window size.

Terminal crashes because fView is not connected to App Server when
this is called so calling fView->GetMouse() is not allowed. We could
perhaps check to make sure that fView is connected to App Server by
checking that fView->Window() != NULL, but, a better way to handle this
is to grab the already set fLastClickPoint variable from fView
which eliminates the need to grab the current mouse position again.
Worst case scenario is that fLastClickPoint hasn't been set in which
case Terminal won't find anything to highlight or unhighlight.

Also check to make sure that fView != NULL here for good measure.

Fixes #10902
This commit is contained in:
John Scipione 2014-06-05 16:18:49 -04:00
parent b84955c738
commit 4c8d238716

View File

@ -966,10 +966,10 @@ TermView::HyperLinkState::_EntryExists(const BString& path,
void void
TermView::HyperLinkState::_UpdateHighlight() TermView::HyperLinkState::_UpdateHighlight()
{ {
BPoint where; if (fView == NULL)
uint32 buttons; return;
fView->GetMouse(&where, &buttons, false);
_UpdateHighlight(where, fView->fModifiers); _UpdateHighlight(fView->fLastClickPoint, fView->fModifiers);
} }