(OSX) Don't leak memory for NSScreen objects

This commit is contained in:
meancoot 2013-09-17 15:33:37 -04:00
parent fb38aafaa3
commit a0e8f7ce13
1 changed files with 9 additions and 6 deletions

View File

@ -222,14 +222,17 @@ static bool g_is_syncing = true;
static RAScreen* get_chosen_screen()
{
unsigned monitor = g_settings.video.monitor_index;
if (monitor >= RAScreen.screens.count)
@autoreleasepool
{
RARCH_WARN("video_monitor_index is greater than the number of connected monitors; using main screen instead.\n");
return RAScreen.mainScreen;
if (monitor >= RAScreen.screens.count)
{
RARCH_WARN("video_monitor_index is greater than the number of connected monitors; using main screen instead.\n");
return RAScreen.mainScreen;
}
return RAScreen.screens[monitor];
}
return RAScreen.screens[monitor];
}
bool apple_gfx_ctx_init()