Fix plugin cleanup

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2021-10-21 18:47:30 +01:00
parent e5fb0e1986
commit 4f4135e177
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
2 changed files with 7 additions and 3 deletions

View file

@ -228,17 +228,20 @@ public:
~CardinalPlugin() override
{
{
const ScopedContext sc(this);
const MutexLocker cml(context->mutex);
rack::contextSet(context);
/*
delete context->scene;
context->scene = nullptr;
delete context->event;
context->event = nullptr;
*/
delete context;
}
delete context;
rack::contextSet(nullptr);
if (! fAutosavePath.empty())
rack::system::removeRecursively(fAutosavePath);
}