diff --git a/source/window/window.cpp b/source/window/window.cpp index 3748d657f..bd8a27967 100644 --- a/source/window/window.cpp +++ b/source/window/window.cpp @@ -190,6 +190,9 @@ namespace hex { constexpr auto CrashBackupFileName = "crash_backup.hexproj"; EventManager::subscribe(this, [CrashBackupFileName](int signal) { + if (!ProjectFile::hasUnsavedChanges()) + return; + for (const auto &path : hex::getPath(ImHexPath::Config)) { if (ProjectFile::store((std::filesystem::path(path) / CrashBackupFileName).string())) break;