Skip to content
Permalink
Browse files

cocoa: Don't crash on messagebox keypress without a successful SDL_In…

…it().
  • Loading branch information
icculus committed May 3, 2017
1 parent d00dfc4 commit ce2998b8b914ebfd42f6ff4a9b09f6f094ab40f0
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/video/cocoa/SDL_cocoakeyboard.m
@@ -646,7 +646,7 @@ - (NSArray *)validAttributesForMarkedText
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 */
}

0 comments on commit ce2998b

Please sign in to comment.