Fix a potential crash in macOS 10.7 and earlier.
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