Fix a potential crash in macOS 10.7 and earlier.
This commit is contained in:
parent
8292d73ebb
commit
e0ea4da4ae
1 changed files with 4 additions and 1 deletions
|
@ -392,7 +392,10 @@ Cocoa_GetDisplayModes(_THIS, SDL_VideoDisplay * display)
|
|||
#endif
|
||||
|
||||
modes = CGDisplayCopyAllDisplayModes(data->display, dict);
|
||||
|
||||
if (dict != NULL) {
|
||||
CFRelease(dict);
|
||||
}
|
||||
|
||||
if (modes) {
|
||||
CVDisplayLinkRef link = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue