diff --git a/indra/llcommon/lldictionary.h b/indra/llcommon/lldictionary.h index 5800ec5e5d8541ded1f8c651550b194511645642..3e86767d7e19455ea26014756af69bcd2e685e58 100644 --- a/indra/llcommon/lldictionary.h +++ b/indra/llcommon/lldictionary.h @@ -87,11 +87,10 @@ class LLDictionary : public std::map<Index, Entry *> } void addEntry(Index index, Entry *entry) { - if (lookup(index)) + if (!insert(value_type(index, entry)).second) { LL_ERRS() << "Dictionary entry already added (attempted to add duplicate entry)" << LL_ENDL; } - (*this)[index] = entry; } };