Browse Source

Fix double free on LV2 instrument deletion

tags/1.9.4
falkTX 11 years ago
parent
commit
982678446f
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      source/backend/plugin/Lv2Plugin.cpp

+ 7
- 1
source/backend/plugin/Lv2Plugin.cpp View File

@@ -261,6 +261,12 @@ struct Lv2PluginEventData {
{
if (data != nullptr)
{
for (uint32_t i=0; i < count; ++i)
{
if (data[i].port != nullptr && ctrl != nullptr && data[i].port == ctrl->port)
data[i].port = nullptr;
}

delete[] data;
data = nullptr;
}
@@ -1619,7 +1625,7 @@ public:
}
else
{
fEventsOut.data[j].port = (CarlaEngineEventPort*)kData->client->addPort(kEnginePortTypeEvent, portName, false);
fEventsOut.data[j].port = (CarlaEngineEventPort*)kData->client->addPort(kEnginePortTypeEvent, portName, false);

if (LV2_IS_PORT_DESIGNATION_CONTROL(fRdfDescriptor->Ports[i].Designation))
{


Loading…
Cancel
Save