cocoa: Don't crash on messagebox keypress without a successful SDL_Init().
This commit is contained in:
parent
98dc082ffa
commit
0da7582ab7
1 changed files with 1 additions and 1 deletions
|
@ -646,7 +646,7 @@ Cocoa_SetTextInputRect(_THIS, SDL_Rect *rect)
|
|||
void
|
||||
Cocoa_HandleKeyEvent(_THIS, NSEvent *event)
|
||||
{
|
||||
SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
|
||||
SDL_VideoData *data = _this ? ((SDL_VideoData *) _this->driverdata) : NULL;
|
||||
if (!data) {
|
||||
return; /* can happen when returning from fullscreen Space on shutdown */
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue