From 4c8d2387169eb503e9a4a347645dd37c238d1c8a Mon Sep 17 00:00:00 2001 From: John Scipione Date: Thu, 5 Jun 2014 16:18:49 -0400 Subject: [PATCH] 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 --- src/apps/terminal/TermViewStates.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/apps/terminal/TermViewStates.cpp b/src/apps/terminal/TermViewStates.cpp index 93b19c2eeb..daaa697ca5 100644 --- a/src/apps/terminal/TermViewStates.cpp +++ b/src/apps/terminal/TermViewStates.cpp @@ -966,10 +966,10 @@ TermView::HyperLinkState::_EntryExists(const BString& path, void TermView::HyperLinkState::_UpdateHighlight() { - BPoint where; - uint32 buttons; - fView->GetMouse(&where, &buttons, false); - _UpdateHighlight(where, fView->fModifiers); + if (fView == NULL) + return; + + _UpdateHighlight(fView->fLastClickPoint, fView->fModifiers); }