core/systems/PluginSys.cpp
changeset 1846 5d0c376864c8
parent 1835 11d60f7219fd
child 1902 ce912ad912a5
     1.1 --- a/core/systems/PluginSys.cpp	Sat Jan 12 19:45:36 2008 +0000
     1.2 +++ b/core/systems/PluginSys.cpp	Sun Jan 13 02:08:40 2008 +0000
     1.3 @@ -799,6 +799,17 @@
     1.4  
     1.5  void CPlugin::AddConfig(bool autoCreate, const char *cfg, const char *folder)
     1.6  {
     1.7 +	/* Do a check for duplicates to prevent double-execution */
     1.8 +	for (size_t i = 0; i < m_configs.size(); i++)
     1.9 +	{
    1.10 +		if (m_configs[i]->autocfg.compare(cfg) == 0
    1.11 +			&& m_configs[i]->folder.compare(folder) == 0
    1.12 +			&& m_configs[i]->create == autoCreate)
    1.13 +		{
    1.14 +			return;
    1.15 +		}
    1.16 +	}
    1.17 +
    1.18  	AutoConfig *c = new AutoConfig;
    1.19  
    1.20  	c->autocfg = cfg;