Fixed: removed nlstop when 2 same commands runs (in services)

removed nlassert when factory not found (who crash the fes)

--HG--
branch : patches-from-atys
hg/hotfix/patches-from-atys
ulukyn 6 years ago
parent f96289dfbe
commit c0037fc55a

@ -14,12 +14,6 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef FACTORY_H
#define FACTORY_H
@ -78,8 +72,11 @@ public:
*/
void registerClass(const KeyType &key, IFactoryRegister<BaseClass> *factoryRegister)
{
nlassert(_FactoryRegisters.find(key) == _FactoryRegisters.end());
_FactoryRegisters.insert(std::make_pair(key, factoryRegister));
// TODO: Removed assert because of crash of fes in 2019. We need found why... (ulukyn)
//nlassert(_FactoryRegisters.find(key) == _FactoryRegisters.end());
//_FactoryRegisters.insert(std::make_pair(key, factoryRegister));
if (_FactoryRegisters.find(key) == _FactoryRegisters.end())
_FactoryRegisters.insert(std::make_pair(key, factoryRegister));
}
/** Create a new instance of a factorable object.

@ -49,8 +49,9 @@ ICommand::ICommand(const char *categoryName, const char *commandName, const char
if (comm != LocalCommands->end ())
{
nlinfo("command with same name: %s", commandName);
// 2 commands have the same name
nlstopex (("There are 2 commands that have the same name in the project (command name '%s'), skip the second definition", commandName));
// nlstopex (("There are 2 commands that have the same name in the project (command name '%s'), skip the second definition", commandName));
}
else
{

Loading…
Cancel
Save