Added this exception to avoid game crash.

master
Jorge Cardoso Leitão 2011-09-11 19:00:50 +01:00
parent 1c8d7e4e04
commit d8eaaabeb3
1 changed files with 8 additions and 1 deletions

View File

@ -917,7 +917,14 @@ bool runVideoOptionsMenu(void)
current = 0;
}
// Set the new width and height (takes effect on restart)
// We can't pick resolutions if there are any.
if(modes.isEmpty())
{
qWarning("No resolutions available to change.");
break;
}
// Set the new width and height (takes effect on restart)
war_SetWidth(modes[current].width());
war_SetHeight(modes[current].height());