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:
@@ -3579,11 +3579,11 @@ bool wxWidgetCocoaImpl::DoHandleKeyEvent(NSEvent *event)
|
|||||||
|
|
||||||
bool wxWidgetCocoaImpl::DoHandleMouseEvent(NSEvent *event)
|
bool wxWidgetCocoaImpl::DoHandleMouseEvent(NSEvent *event)
|
||||||
{
|
{
|
||||||
|
(void)SetupCursor(event);
|
||||||
|
|
||||||
wxMouseEvent wxevent(wxEVT_LEFT_DOWN);
|
wxMouseEvent wxevent(wxEVT_LEFT_DOWN);
|
||||||
SetupMouseEvent(wxevent , event) ;
|
SetupMouseEvent(wxevent , event) ;
|
||||||
bool result = GetWXPeer()->HandleWindowEvent(wxevent);
|
bool result = GetWXPeer()->HandleWindowEvent(wxevent);
|
||||||
|
|
||||||
(void)SetupCursor(event);
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user