diff options
author | David Robillard <d@drobilla.net> | 2011-02-26 19:50:27 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-02-26 19:50:27 +0000 |
commit | 344d4bb90cee789e561e1b5684ca9076f255121b (patch) | |
tree | 090a48b0d74a5418c46455f5c553eac7792b9ac3 /src | |
parent | 6c16b5c6d49c38f13eb85fc6673fb6bbcf797ec1 (diff) | |
download | suil-344d4bb90cee789e561e1b5684ca9076f255121b.tar.gz suil-344d4bb90cee789e561e1b5684ca9076f255121b.tar.bz2 suil-344d4bb90cee789e561e1b5684ca9076f255121b.zip |
Gracefully handle missing module symbols.
git-svn-id: http://svn.drobilla.net/lad/trunk/suil@3029 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/instance.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/instance.c b/src/instance.c index 4cb835d..46d390a 100644 --- a/src/instance.c +++ b/src/instance.c @@ -94,8 +94,15 @@ get_wrap_module(const char* host_type_uri, module->init = (SuilWrapInitFunc)suil_dlfunc(lib, "suil_wrap_init"); module->wrap = (SuilWrapFunc)suil_dlfunc(lib, "suil_wrap"); + if (!module->init || !module->wrap) { + SUIL_ERRORF("Corrupt module %s\n", path); + free(path); + free(module); + return NULL; + } + free(path); - + return module; } |