Qt: Check if game filename is null before loading.

This is so that the error message box does not
appear if the user simply cancels loading a game.
This commit is contained in:
Rohit Nirmal 2015-04-26 10:36:12 -05:00
parent 392b9abece
commit 10aa6488d9
1 changed files with 3 additions and 1 deletions

View File

@ -160,7 +160,9 @@ void DMainWindow::DoStartPause()
void DMainWindow::OnOpen()
{
StartGame(ShowFileDialog());
QString filename = ShowFileDialog();
if (!filename.isNull())
StartGame(filename);
}
void DMainWindow::OnPlay()