summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AUTHORS2
-rw-r--r--NEWS3
-rw-r--r--src/instance.c4
3 files changed, 7 insertions, 2 deletions
diff --git a/AUTHORS b/AUTHORS
index fb9e3bc..70cccdb 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -4,3 +4,5 @@ Contributors:
* Devin Anderson <surfacepatterns@gmail.com>
* Fix reparenting of Gtk UIs in Qt
+ * Peter Nelson <peter@fuzzle.org>
+ * Fix crash when a broken UI returns a NULL descriptor
diff --git a/NEWS b/NEWS
index 0c37478..16b73aa 100644
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,9 @@
suil (0.6.11) unstable;
+ * Fix crash when a broken UI returns a NULL descriptor
* Fix compilation on BSD
- -- David Robillard <d@drobilla.net> Sat, 02 Feb 2013 21:31:54 -0500
+ -- David Robillard <d@drobilla.net> Sat, 09 Feb 2013 15:31:44 -0500
suil (0.6.10) stable;
diff --git a/src/instance.c b/src/instance.c
index 617280e..d5e744a 100644
--- a/src/instance.c
+++ b/src/instance.c
@@ -171,7 +171,9 @@ suil_instance_new(SuilHost* host,
const LV2UI_Descriptor* descriptor = NULL;
for (uint32_t i = 0; true; ++i) {
const LV2UI_Descriptor* ld = df(i);
- if (!strcmp(ld->URI, ui_uri)) {
+ if (!ld) {
+ break;
+ } else if (!strcmp(ld->URI, ui_uri)) {
descriptor = ld;
break;
}