summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/Engine.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/engine/Engine.cpp b/src/engine/Engine.cpp
index a17a58c0..5fdee74a 100644
--- a/src/engine/Engine.cpp
+++ b/src/engine/Engine.cpp
@@ -83,11 +83,11 @@ Engine::~Engine()
{
deactivate();
- for (EngineStore::iterator i = engine_store()->begin();
- i != engine_store()->end(); ++i) {
- if ( ! PtrCast<GraphObjectImpl>(i->second)->parent() )
- i->second.reset();
- }
+ SharedPtr<EngineStore> store = engine_store();
+ if (store)
+ for (EngineStore::iterator i = store->begin(); i != store->end(); ++i)
+ if ( ! PtrCast<GraphObjectImpl>(i->second)->parent() )
+ i->second.reset();
delete _broadcaster;
delete _node_factory;