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
parent 713f695aa4
commit 1afd5b4187

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