diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index 84a83c685..e92f73401 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -1755,9 +1755,11 @@ bool MainWindow::winEvent(MSG* msg, long*) { void MainWindow::Exit() { // To shut down the application when fadeout will be finished connect(player_->engine(), SIGNAL(FadeoutFinishedSignal()), qApp, SLOT(quit())); - - player_->Stop(); - - hide(); - tray_icon_->SetVisible(false); + if(player_->GetState() == Engine::Playing) { + player_->Stop(); + hide(); + tray_icon_->SetVisible(false); + } else { + qApp->quit(); + } }