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
|
#endif
|
||||||
|
|
||||||
modes = CGDisplayCopyAllDisplayModes(data->display, dict);
|
modes = CGDisplayCopyAllDisplayModes(data->display, dict);
|
||||||
|
|
||||||
|
if (dict != NULL) {
|
||||||
CFRelease(dict);
|
CFRelease(dict);
|
||||||
|
}
|
||||||
|
|
||||||
if (modes) {
|
if (modes) {
|
||||||
CVDisplayLinkRef link = NULL;
|
CVDisplayLinkRef link = NULL;
|
||||||
|
|
Loading…
Reference in New Issue