Prevent a crash that happens if you context-click while autocomplete is active in mail compose (bug 137864). r=danm, sr=jag.

This commit is contained in:
bryner%netscape.com 2002-05-21 00:00:46 +00:00
parent 28a8310598
commit f711b863c8

View File

@ -1124,11 +1124,16 @@ nsEventStateManager :: FireContextClick ( )
// dispatch to DOM
lastContent->HandleDOMEvent(mEventPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, &status);
// Firing the DOM event could have caused mGestureDownFrame to
// be destroyed. So, null-check it again.
if (mGestureDownFrame) {
// dispatch to the frame
mGestureDownFrame->HandleEvent(mEventPresContext, &event, &status);
}
}
}
}
// now check if the event has been handled. If so, stop tracking a drag
if ( status == nsEventStatus_eConsumeNoDefault )