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.
This commit is contained in:
WarmUpTill 2026-04-28 19:11:26 +02:00 committed by WarmUpTill
parent c3669cae3e
commit 86061b3cf1

View File

@ -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);
}