From c35807cfaba4c7f4d797ec600769c09715cfe871 Mon Sep 17 00:00:00 2001 From: Exeldro Date: Tue, 24 Feb 2026 09:02:34 +0100 Subject: [PATCH] utils: Fix crash getting profile or scene collection during OBS shutdown --- src/utils/Obs_StringHelper.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/Obs_StringHelper.cpp b/src/utils/Obs_StringHelper.cpp index 69afc13f..66b73102 100644 --- a/src/utils/Obs_StringHelper.cpp +++ b/src/utils/Obs_StringHelper.cpp @@ -49,19 +49,19 @@ std::string Utils::Obs::StringHelper::GetModuleConfigPath(std::string fileName) std::string Utils::Obs::StringHelper::GetCurrentSceneCollection() { BPtr sceneCollectionName = obs_frontend_get_current_scene_collection(); - return std::string(sceneCollectionName.Get()); + return std::string(sceneCollectionName ? sceneCollectionName.Get() : ""); } std::string Utils::Obs::StringHelper::GetCurrentProfile() { BPtr profileName = obs_frontend_get_current_profile(); - return std::string(profileName.Get()); + return std::string(profileName ? profileName.Get() : ""); } std::string Utils::Obs::StringHelper::GetCurrentProfilePath() { BPtr profilePath = obs_frontend_get_current_profile_path(); - return std::string(profilePath.Get()); + return std::string(profilePath ? profilePath.Get() : ""); } std::string Utils::Obs::StringHelper::GetCurrentRecordOutputPath()