diff --git a/src/video/cocoa/SDL_cocoaevents.m b/src/video/cocoa/SDL_cocoaevents.m index daaa0ba33..81f086cea 100644 --- a/src/video/cocoa/SDL_cocoaevents.m +++ b/src/video/cocoa/SDL_cocoaevents.m @@ -284,7 +284,10 @@ static void Cocoa_DispatchEvent(NSEvent *theEvent) - (void)screenParametersChanged:(NSNotification *)aNotification { - Cocoa_UpdateDisplays(SDL_GetVideoDevice()); + SDL_VideoDevice *device = SDL_GetVideoDevice(); + if (device) { + Cocoa_UpdateDisplays(device); + } } - (void)localeDidChange:(NSNotification *)notification