Skip to content

Commit

Permalink
cocoa: Don't crash on messagebox keypress without a successful SDL_In…
Browse files Browse the repository at this point in the history
…it().
  • Loading branch information
icculus committed May 3, 2017
1 parent d00dfc4 commit ce2998b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video/cocoa/SDL_cocoakeyboard.m
Expand Up @@ -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 */
}
Expand Down

0 comments on commit ce2998b

Please sign in to comment.