diff --git a/frontend/widgets/OBSBasic_SceneCollections.cpp b/frontend/widgets/OBSBasic_SceneCollections.cpp index 07c16cf6b..b49e149cf 100644 --- a/frontend/widgets/OBSBasic_SceneCollections.cpp +++ b/frontend/widgets/OBSBasic_SceneCollections.cpp @@ -83,6 +83,10 @@ void cleanBackupCollision(const OBSSceneCollection &collection) void OBSBasic::SetupNewSceneCollection(const std::string &collectionName) { + if (collectionName.empty()) { + throw std::logic_error("Cannot create new scene collection with empty collection name"); + } + const OBSSceneCollection &newCollection = CreateSceneCollection(collectionName); OnEvent(OBS_FRONTEND_EVENT_SCENE_COLLECTION_CHANGING);