Initialize active profile tracking variables and don't try loading active profile if no profile is active

This commit is contained in:
Adam Honse
2026-08-29 17:42:33 -05:00
parent c029bb2b1d
commit 255cfcf422
+15 -1
View File
@@ -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)