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:
parent
392b9abece
commit
10aa6488d9
|
@ -160,7 +160,9 @@ void DMainWindow::DoStartPause()
|
|||
|
||||
void DMainWindow::OnOpen()
|
||||
{
|
||||
StartGame(ShowFileDialog());
|
||||
QString filename = ShowFileDialog();
|
||||
if (!filename.isNull())
|
||||
StartGame(filename);
|
||||
}
|
||||
|
||||
void DMainWindow::OnPlay()
|
||||
|
|
Loading…
Reference in New Issue