mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-01-22 01:57:18 +01:00
Fix a potential crash in macOS 10.7 and earlier.
This commit is contained in:
parent
8292d73ebb
commit
e0ea4da4ae
@ -392,7 +392,10 @@ Cocoa_GetDisplayModes(_THIS, SDL_VideoDisplay * display)
|
||||
#endif
|
||||
|
||||
modes = CGDisplayCopyAllDisplayModes(data->display, dict);
|
||||
CFRelease(dict);
|
||||
|
||||
if (dict != NULL) {
|
||||
CFRelease(dict);
|
||||
}
|
||||
|
||||
if (modes) {
|
||||
CVDisplayLinkRef link = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user