diff options
-rw-r--r-- | NEWS | 5 | ||||
-rw-r--r-- | src/instance.c | 15 |
2 files changed, 12 insertions, 8 deletions
@@ -4,10 +4,11 @@ suil (0.8.3) unstable; * Add Cocoa in Gtk wrapper (patch from Robin Gareus) * Various Windows fixes (patches from Robin Gareus) * Fix compilation with -Wl,--no-undefined - * Fix a few minor/unlikely memory errors. + * Fix a few minor/unlikely memory errors + * Gracefully handle failure to open wrapper * Only report suil_ui_supported() if necessary wrapper is compiled in - -- David Robillard <d@drobilla.net> Thu, 14 May 2015 01:26:31 -0400 + -- David Robillard <d@drobilla.net> Fri, 11 Sep 2015 17:38:26 -0400 suil (0.8.2) stable; diff --git a/src/instance.c b/src/instance.c index 4ace18c..a336dcb 100644 --- a/src/instance.c +++ b/src/instance.c @@ -65,10 +65,6 @@ open_wrapper(SuilHost* host, LV2_Feature*** features, unsigned n_features) { - if (!container_type_uri || !strcmp(container_type_uri, ui_type_uri)) { - return NULL; - } - const char* module_name = NULL; #ifdef SUIL_WITH_GTK2_IN_QT4 if (!strcmp(container_type_uri, QT4_UI_URI) @@ -254,8 +250,15 @@ suil_instance_new(SuilHost* host, } // Open wrapper (this may add additional features) - instance->wrapper = open_wrapper( - host, container_type_uri, ui_type_uri, &instance->features, n_features); + if (container_type_uri && strcmp(container_type_uri, ui_type_uri)) { + instance->wrapper = open_wrapper(host, + container_type_uri, ui_type_uri, + &instance->features, n_features); + if (!instance->wrapper) { + suil_instance_free(instance); + return NULL; + } + } // Instantiate UI instance->handle = descriptor->instantiate( |