diff options
Diffstat (limited to 'src/libs/engine/ObjectStore.cpp')
-rw-r--r-- | src/libs/engine/ObjectStore.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libs/engine/ObjectStore.cpp b/src/libs/engine/ObjectStore.cpp index 2df1965f..052200fd 100644 --- a/src/libs/engine/ObjectStore.cpp +++ b/src/libs/engine/ObjectStore.cpp @@ -79,7 +79,11 @@ ObjectStore::add(GraphObjectImpl* o) { assert(ThreadManager::current_thread_id() == THREAD_PRE_PROCESS); - //cerr << "[ObjectStore] Adding " << o->path() << endl; + if (_objects.find(o->path()) != _objects.end()) { + cerr << "[ObjectStore] ERROR: Attempt to add duplicate object " << o->path() << endl; + return; + } + _objects.insert(make_pair(o->path(), o)); NodeImpl* node = dynamic_cast<NodeImpl*>(o); |