Skip to content

Commit

Permalink
Fix a potential crash in macOS 10.7 and earlier.
Browse files Browse the repository at this point in the history
  • Loading branch information
slime73 committed Jul 13, 2017
1 parent 8292d73 commit e0ea4da
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/video/cocoa/SDL_cocoamodes.m
Expand Up @@ -392,7 +392,10 @@
#endif

modes = CGDisplayCopyAllDisplayModes(data->display, dict);
CFRelease(dict);

if (dict != NULL) {
CFRelease(dict);
}

if (modes) {
CVDisplayLinkRef link = NULL;
Expand Down

0 comments on commit e0ea4da

Please sign in to comment.