summaryrefslogtreecommitdiffstats
path: root/src/progs/ingenuity/App.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/progs/ingenuity/App.cpp')
-rw-r--r--src/progs/ingenuity/App.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/progs/ingenuity/App.cpp b/src/progs/ingenuity/App.cpp
index e1e4912d..8ffcd710 100644
--- a/src/progs/ingenuity/App.cpp
+++ b/src/progs/ingenuity/App.cpp
@@ -120,13 +120,15 @@ App::attach(const SharedPtr<ModelEngineInterface>& engine, const SharedPtr<SigCl
void
App::detach()
{
- _window_factory->clear();
- _store->clear();
-
- _loader.reset();
- _store.reset();
- _client.reset();
- _engine.reset();
+ if (_engine) {
+ _window_factory->clear();
+ _store->clear();
+
+ _loader.reset();
+ _store.reset();
+ _client.reset();
+ _engine.reset();
+ }
}