Mac: Fixed crash when returning from a fullscreen Space on shutdown.
parent
70cebc7d43
commit
39bad809c3
|
@ -565,6 +565,10 @@ void
|
|||
Cocoa_HandleKeyEvent(_THIS, NSEvent *event)
|
||||
{
|
||||
SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
|
||||
if (!data) {
|
||||
return; /* can happen when returning from fullscreen Space on shutdown */
|
||||
}
|
||||
|
||||
unsigned short scancode = [event keyCode];
|
||||
SDL_Scancode code;
|
||||
#if 0
|
||||
|
|
|
@ -349,8 +349,11 @@ Cocoa_HandleMouseEvent(_THIS, NSEvent *event)
|
|||
}
|
||||
|
||||
SDL_Mouse *mouse = SDL_GetMouse();
|
||||
|
||||
SDL_MouseData *driverdata = (SDL_MouseData*)mouse->driverdata;
|
||||
if (!driverdata) {
|
||||
return; /* can happen when returning from fullscreen Space on shutdown */
|
||||
}
|
||||
|
||||
const SDL_bool seenWarp = driverdata->seenWarp;
|
||||
driverdata->seenWarp = NO;
|
||||
|
||||
|
|
Loading…
Reference in New Issue