diff --git a/obs/window-basic-main.cpp b/obs/window-basic-main.cpp index 267f6222a..bd2914e06 100644 --- a/obs/window-basic-main.cpp +++ b/obs/window-basic-main.cpp @@ -1124,6 +1124,15 @@ OBSBasic::~OBSBasic() #endif } +void OBSBasic::SaveProjectNow() +{ + if (disableSaving) + return; + + projectChanged = true; + SaveProjectDeferred(); +} + void OBSBasic::SaveProject() { if (disableSaving) @@ -2199,8 +2208,7 @@ void OBSBasic::closeEvent(QCloseEvent *event) // the destructor gets called obs_remove_draw_callback(OBSBasic::RenderMain, this); - projectChanged = true; - SaveProjectDeferred(); + SaveProjectNow(); disableSaving++; /* Clear all scene data (dialogs, widgets, widget sub-items, scenes, diff --git a/obs/window-basic-main.hpp b/obs/window-basic-main.hpp index 69785fcb3..0985b64ef 100644 --- a/obs/window-basic-main.hpp +++ b/obs/window-basic-main.hpp @@ -184,6 +184,8 @@ private: void RefreshProfiles(); void ChangeProfile(); + void SaveProjectNow(); + obs_hotkey_pair_id streamingHotkeys, recordingHotkeys; public slots: