keep processing LV2 Ringbuffer once it is allocated
authorRobin Gareus <robin@gareus.org>
Tue, 5 Nov 2013 01:06:20 +0000 (02:06 +0100)
committerRobin Gareus <robin@gareus.org>
Tue, 5 Nov 2013 01:06:20 +0000 (02:06 +0100)
Discard messages in LV2PluginUI::write_to_ui() if the
ringbuffer exists but the UI is not active.

This fixes "[ERROR]: Error writing from plugin to UI" messages
if the UI was once active but has been closed since.

This is a hotfix solution, eventually the LV2 backend should be updated
and a function LV2Plugin::disable_ui_emmission() implemented.

gtk2_ardour/lv2_plugin_ui.cc

index c273c1f4ddbf161322a4aa9daeb441d939b60a8e..07e8699ebc25dbdfc4b5666415d74cb0d198db66 100644 (file)
@@ -478,12 +478,12 @@ void
 LV2PluginUI::on_window_hide()
 {
        //printf("LV2PluginUI::on_window_hide\n");
-       _message_update_connection.disconnect();
 
        if (_lv2->is_external_ui()) {
                if (!_external_ui_ptr) { return; }
                LV2_EXTERNAL_UI_HIDE(_external_ui_ptr);
                if (!_lv2->is_external_kx()) { return ; }
+               _message_update_connection.disconnect();
                _screen_update_connection.disconnect();
                _external_ui_ptr = NULL;
                suil_instance_free((SuilInstance*)_inst);