MouseEvent crash fix on wxWindow Destroy
If the event handler destroys the wxWindow, then the subsequent call to SetupCursor(event) will miserably fail . Moved setting the cursor before the event is handled.
This commit is contained in:
parent
276d96b583
commit
3de6d1eb17
@ -3579,11 +3579,11 @@ bool wxWidgetCocoaImpl::DoHandleKeyEvent(NSEvent *event)
|
||||
|
||||
bool wxWidgetCocoaImpl::DoHandleMouseEvent(NSEvent *event)
|
||||
{
|
||||
(void)SetupCursor(event);
|
||||
|
||||
wxMouseEvent wxevent(wxEVT_LEFT_DOWN);
|
||||
SetupMouseEvent(wxevent , event) ;
|
||||
bool result = GetWXPeer()->HandleWindowEvent(wxevent);
|
||||
|
||||
(void)SetupCursor(event);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user