diff --git a/app/scanner/mainwindow.cpp b/app/scanner/mainwindow.cpp index bf7661ff..19cc743c 100644 --- a/app/scanner/mainwindow.cpp +++ b/app/scanner/mainwindow.cpp @@ -2457,12 +2457,11 @@ void MainWindow::closeEvent(QCloseEvent *e) return; } } - } QDir dir = QDir(Dialog_ClrCache::getCachePath()); - dir.removeRecursively(); - QMainWindow::closeEvent(e); + if (dir.exists()) + dir.removeRecursively(); m_versionDll->PostUserCloseInfo(HGVERSION_APPNAME_SCANNER); }