macOS: Fix a crash when the video subsystem quits, if SDL_MAC_NO_SANDBOX was defined when SDL was compiled.
parent
56ec349d2a
commit
fb485986eb
|
@ -237,6 +237,13 @@ Cocoa_QuitMouseEventTap(SDL_MouseData *driverdata)
|
||||||
SDL_MouseEventTapData *tapdata = (SDL_MouseEventTapData*)driverdata->tapdata;
|
SDL_MouseEventTapData *tapdata = (SDL_MouseEventTapData*)driverdata->tapdata;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
|
if (tapdata == NULL) {
|
||||||
|
/* event tap was already cleaned up (possibly due to CGEventTapCreate
|
||||||
|
* returning null.)
|
||||||
|
*/
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Ensure that the runloop has been started first.
|
/* Ensure that the runloop has been started first.
|
||||||
* TODO: Move this to InitMouseEventTap, check for error conditions that can
|
* TODO: Move this to InitMouseEventTap, check for error conditions that can
|
||||||
* happen in Cocoa_MouseTapThread, and fall back to the non-EventTap way of
|
* happen in Cocoa_MouseTapThread, and fall back to the non-EventTap way of
|
||||||
|
|
Loading…
Reference in New Issue