summaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/server')
-rw-r--r--src/server/Engine.cpp1
-rw-r--r--src/server/ingen_lv2.cpp12
2 files changed, 10 insertions, 3 deletions
diff --git a/src/server/Engine.cpp b/src/server/Engine.cpp
index 5c36f5c2..1dbd73bb 100644
--- a/src/server/Engine.cpp
+++ b/src/server/Engine.cpp
@@ -102,6 +102,7 @@ Engine::~Engine()
s.second.reset();
}
}
+ store->clear();
}
_world->set_store(SPtr<Ingen::Store>());
diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp
index 6f50847b..c8c0b922 100644
--- a/src/server/ingen_lv2.cpp
+++ b/src/server/ingen_lv2.cpp
@@ -651,8 +651,11 @@ ingen_deactivate(LV2_Handle instance)
{
IngenPlugin* me = (IngenPlugin*)instance;
me->world->engine()->deactivate();
- delete me->main;
- me->main = NULL;
+ if (me->main) {
+ me->main->join();
+ delete me->main;
+ me->main = NULL;
+ }
}
static void
@@ -661,7 +664,10 @@ ingen_cleanup(LV2_Handle instance)
IngenPlugin* me = (IngenPlugin*)instance;
me->world->set_engine(SPtr<Ingen::Server::Engine>());
me->world->set_interface(SPtr<Ingen::Interface>());
- delete me->main;
+ if (me->main) {
+ me->main->join();
+ delete me->main;
+ }
delete me->world;
delete me;
}