Fixed a bug in MainWindow.doActionQuit().