From 86061b3cf1640f02ac3a76c52cc353cc22b9cf70 Mon Sep 17 00:00:00 2001 From: WarmUpTill <19472752+WarmUpTill@users.noreply.github.com> Date: Tue, 28 Apr 2026 19:11:26 +0200 Subject: [PATCH] Ignore OBS_FRONTEND_EVENT_SCENE_COLLECTION_CLEANUP on shutdown This prevents the plugin being restarted, connections being reset, and potentially delaying the shutdown of OBS. --- lib/advanced-scene-switcher.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/advanced-scene-switcher.cpp b/lib/advanced-scene-switcher.cpp index 0e863c99..0c94b142 100644 --- a/lib/advanced-scene-switcher.cpp +++ b/lib/advanced-scene-switcher.cpp @@ -627,6 +627,13 @@ static void handleSceneCollectionCleanup() return; } + // OBS_FRONTEND_EVENT_SCENE_COLLECTION_CLEANUP is also called on + // shutdown. + // Here we also don't want to reload the settings. + if (switcher->obsIsShuttingDown) { + return; + } + SaveSceneSwitcher(nullptr, false, nullptr); }