diff options
author | David Robillard <d@drobilla.net> | 2013-02-09 20:36:16 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-02-09 20:36:16 +0000 |
commit | d3f8c39e37bca1797934651ae25b287cb0109c78 (patch) | |
tree | 12916ef4c7fd1e2cefd6077f7ea92055f69cea4d /src/instance.c | |
parent | cb4920ac71c3fbbb25e284e031f59d52cc03edb2 (diff) | |
download | suil-d3f8c39e37bca1797934651ae25b287cb0109c78.tar.gz suil-d3f8c39e37bca1797934651ae25b287cb0109c78.tar.bz2 suil-d3f8c39e37bca1797934651ae25b287cb0109c78.zip |
Fix crash when a broken UI returns a NULL descriptor (#886).
git-svn-id: http://svn.drobilla.net/lad/trunk/suil@5052 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/instance.c')
-rw-r--r-- | src/instance.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |