Browse Source

Fix plugin cleanup

Signed-off-by: falkTX <falktx@falktx.com>
tags/22.02
falkTX 4 years ago
parent
commit
4f4135e177
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 7 additions and 3 deletions
  1. +6
    -3
      src/CardinalPlugin.cpp
  2. +1
    -0
      src/CardinalUI.cpp

+ 6
- 3
src/CardinalPlugin.cpp 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);
}


+ 1
- 0
src/CardinalUI.cpp View File

@@ -139,6 +139,7 @@ public:
if (button->text == "Library")
{
layout->children.erase(it);
button->parent = nullptr;
delete button;
break;
}


Loading…
Cancel
Save