summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/GraphObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/engine/GraphObject.cpp')
-rw-r--r--src/libs/engine/GraphObject.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libs/engine/GraphObject.cpp b/src/libs/engine/GraphObject.cpp
index 03b4eae7..7173e6f8 100644
--- a/src/libs/engine/GraphObject.cpp
+++ b/src/libs/engine/GraphObject.cpp
@@ -33,6 +33,7 @@ GraphObject::parent_patch() const
void
GraphObject::add_to_store(ObjectStore* store)
{
+ assert(!_store);
store->add(this);
_store = store;
}
@@ -41,6 +42,8 @@ GraphObject::add_to_store(ObjectStore* store)
void
GraphObject::remove_from_store()
{
+ assert(_store);
+
if (_store) {
TreeNode<GraphObject*>* node = _store->remove(path());
if (node != NULL) {