From 255cfcf422838d2927c4adc27ab948babacb1fae Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Sat, 29 Aug 2026 17:42:33 -0500 Subject: [PATCH] Initialize active profile tracking variables and don't try loading active profile if no profile is active --- ProfileManager.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ProfileManager.cpp b/ProfileManager.cpp index afacfab7a..7087240b1 100644 --- a/ProfileManager.cpp +++ b/ProfileManager.cpp @@ -42,6 +42,13 @@ ProfileManager::ProfileManager(const filesystem::path& config_dir) SetConfigurationDirectory(config_dir); UpdateProfileList(); + /*-----------------------------------------------------*\ + | Initialize active state variables | + \*-----------------------------------------------------*/ + active_profile = ""; + active_base_color = 0; + active_base_color_enabled = false; + /*-----------------------------------------------------*\ | Create ProfileManager settings schema | \*-----------------------------------------------------*/ @@ -429,7 +436,14 @@ bool ProfileManager::LoadAutoProfileSuspend() bool ProfileManager::LoadControllerActiveProfile(RGBController* load_controller) { - return(LoadControllerFromListWithOptions(active_rgb_controllers, load_controller, false, true)); + if(active_profile == "") + { + return false; + } + else + { + return(LoadControllerFromListWithOptions(active_rgb_controllers, load_controller, false, true)); + } } bool ProfileManager::LoadControllerConfiguration(RGBController* load_controller)