Fix plugin cleanup
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
e5fb0e1986
commit
4f4135e177
2 changed files with 7 additions and 3 deletions
|
|
@ -228,17 +228,20 @@ public:
|
||||||
~CardinalPlugin() override
|
~CardinalPlugin() override
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
const ScopedContext sc(this);
|
const MutexLocker cml(context->mutex);
|
||||||
|
rack::contextSet(context);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
delete context->scene;
|
delete context->scene;
|
||||||
context->scene = nullptr;
|
context->scene = nullptr;
|
||||||
|
|
||||||
delete context->event;
|
delete context->event;
|
||||||
context->event = nullptr;
|
context->event = nullptr;
|
||||||
*/
|
*/
|
||||||
delete context;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
delete context;
|
||||||
|
rack::contextSet(nullptr);
|
||||||
|
|
||||||
if (! fAutosavePath.empty())
|
if (! fAutosavePath.empty())
|
||||||
rack::system::removeRecursively(fAutosavePath);
|
rack::system::removeRecursively(fAutosavePath);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -139,6 +139,7 @@ public:
|
||||||
if (button->text == "Library")
|
if (button->text == "Library")
|
||||||
{
|
{
|
||||||
layout->children.erase(it);
|
layout->children.erase(it);
|
||||||
|
button->parent = nullptr;
|
||||||
delete button;
|
delete button;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue