diff --git a/source/backend/plugin/CarlaPluginLV2.cpp b/source/backend/plugin/CarlaPluginLV2.cpp index 6a9095a89..9073fe659 100644 --- a/source/backend/plugin/CarlaPluginLV2.cpp +++ b/source/backend/plugin/CarlaPluginLV2.cpp @@ -1443,12 +1443,16 @@ public: fFeatures[kFeatureIdUiParent]->data = fUI.window->getPtr(); } #endif - if (fUI.window != nullptr) - fUI.window->setTitle(fLv2Options.windowTitle); - fUI.widget = nullptr; fUI.handle = fUI.descriptor->instantiate(fUI.descriptor, fRdfDescriptor->URI, fUI.rdfDescriptor->Bundle, carla_lv2_ui_write_function, this, &fUI.widget, fFeatures); + + if (fUI.window != nullptr) + { + fUI.window->setChildWindow(fUI.widget); + fUI.window->setTitle(fLv2Options.windowTitle); + } + } CARLA_SAFE_ASSERT(fUI.handle != nullptr); @@ -1474,7 +1478,6 @@ public: { if (fUI.window != nullptr) { - fUI.window->setChildWindow(fUI.widget); fUI.window->show(); } else if (fExt.uishow != nullptr) diff --git a/source/bridges-ui/CarlaBridgeFormatLV2.cpp b/source/bridges-ui/CarlaBridgeFormatLV2.cpp index d304ee645..855245e34 100644 --- a/source/bridges-ui/CarlaBridgeFormatLV2.cpp +++ b/source/bridges-ui/CarlaBridgeFormatLV2.cpp @@ -441,7 +441,8 @@ public: CARLA_SAFE_ASSERT_RETURN(fHandle != nullptr, false); #if defined(BRIDGE_COCOA) || defined(BRIDGE_HWND) || defined(BRIDGE_X11) - fToolkit->setChildWindow(fWidget); + if (fWidget != nullptr) + fToolkit->setChildWindow(fWidget); #endif // ------------------------------------------------------------------------------------------------------------