diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/ingen_gui_lv2.cpp | 6 | ||||
-rw-r--r-- | src/server/events/SetMetadata.cpp | 6 | ||||
-rw-r--r-- | src/server/ingen_lv2.cpp | 17 |
3 files changed, 19 insertions, 10 deletions
diff --git a/src/gui/ingen_gui_lv2.cpp b/src/gui/ingen_gui_lv2.cpp index f4b1aa96..18f1c970 100644 --- a/src/gui/ingen_gui_lv2.cpp +++ b/src/gui/ingen_gui_lv2.cpp @@ -55,7 +55,11 @@ struct IngenLV2AtomSink : public Ingen::Shared::AtomSink { struct IngenLV2UI { IngenLV2UI() - : sink(NULL) + : argc(0) + , argv(NULL) + , forge(NULL) + , world(NULL) + , sink(NULL) {} int argc; diff --git a/src/server/events/SetMetadata.cpp b/src/server/events/SetMetadata.cpp index 5849269a..15ed26cc 100644 --- a/src/server/events/SetMetadata.cpp +++ b/src/server/events/SetMetadata.cpp @@ -317,9 +317,9 @@ SetMetadata::execute(ProcessContext& context) break; case POLYPHONY: if (_patch->internal_poly() != static_cast<uint32_t>(value.get_int32()) && - !_patch->apply_internal_poly(_engine.process_context(), - *_engine.buffer_factory(), - *_engine.maid(), value.get_int32())) { + !_patch->apply_internal_poly(context, + *_engine.buffer_factory(), + *_engine.maid(), value.get_int32())) { _status = INTERNAL_ERROR; } break; diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp index b33f412a..e9852534 100644 --- a/src/server/ingen_lv2.cpp +++ b/src/server/ingen_lv2.cpp @@ -316,7 +316,14 @@ private: }; struct IngenPlugin { - Ingen::Shared::Forge forge; + IngenPlugin() + : world(NULL) + , main(NULL) + , map(NULL) + , argc(0) + , argv(NULL) + {} + Ingen::Shared::World* world; MainThread* main; LV2_URID_Map* map; @@ -386,10 +393,8 @@ ingen_instantiate(const LV2_Descriptor* descriptor, return NULL; } - IngenPlugin* plugin = (IngenPlugin*)malloc(sizeof(IngenPlugin)); - plugin->main = NULL; - plugin->map = NULL; - LV2_URID_Unmap* unmap = NULL; + IngenPlugin* plugin = new IngenPlugin(); + LV2_URID_Unmap* unmap = NULL; for (int i = 0; features[i]; ++i) { if (!strcmp(features[i]->URI, LV2_URID_URI "#map")) { plugin->map = (LV2_URID_Map*)features[i]->data; @@ -499,7 +504,7 @@ ingen_cleanup(LV2_Handle instance) me->world->set_engine(SharedPtr<Ingen::Server::Engine>()); me->world->set_interface(SharedPtr<Ingen::Interface>()); delete me->world; - free(instance); + delete me; } static void |