Fixed a bug in Loading config
If no config was selected when Load was clicked, an exception would be thrown
This commit is contained in:
parent
c8145a7046
commit
eb70a56f8a
1 changed files with 15 additions and 12 deletions
|
@ -129,18 +129,21 @@ public:
|
|||
// Load selected configuration
|
||||
//-----------------------------------------------
|
||||
i = lstConfigs->getSelected();
|
||||
if(ConfigFilesList[i]->BuildInID != BUILDINID_NONE)
|
||||
{
|
||||
load_buildin_config(ConfigFilesList[i]->BuildInID);
|
||||
strcpy(changed_prefs.description, ConfigFilesList[i]->Description);
|
||||
}
|
||||
else
|
||||
{
|
||||
target_cfgfile_load(&changed_prefs, ConfigFilesList[i]->FullPath, 0, 0);
|
||||
}
|
||||
strncpy(last_active_config, ConfigFilesList[i]->Name, MAX_PATH);
|
||||
DisableResume();
|
||||
RefreshAllPanels();
|
||||
if (i != -1)
|
||||
{
|
||||
if(ConfigFilesList[i]->BuildInID != BUILDINID_NONE)
|
||||
{
|
||||
load_buildin_config(ConfigFilesList[i]->BuildInID);
|
||||
strcpy(changed_prefs.description, ConfigFilesList[i]->Description);
|
||||
}
|
||||
else
|
||||
{
|
||||
target_cfgfile_load(&changed_prefs, ConfigFilesList[i]->FullPath, 0, 0);
|
||||
}
|
||||
strncpy(last_active_config, ConfigFilesList[i]->Name, MAX_PATH);
|
||||
DisableResume();
|
||||
RefreshAllPanels();
|
||||
}
|
||||
}
|
||||
else if(actionEvent.getSource() == cmdSave)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue