diff options
author | David Robillard <d@drobilla.net> | 2011-06-11 22:01:13 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-06-11 22:01:13 +0000 |
commit | f5f6dc573149d961b6c5df81e391a30409b7c0a3 (patch) | |
tree | 3b1872437268084b9f5533c8b42095f93023daa1 | |
parent | c69624e0e2b255b8a428974f851c81dd7899ce3c (diff) | |
download | suil-f5f6dc573149d961b6c5df81e391a30409b7c0a3.tar.gz suil-f5f6dc573149d961b6c5df81e391a30409b7c0a3.tar.bz2 suil-f5f6dc573149d961b6c5df81e391a30409b7c0a3.zip |
Make suil_host_free tolerate being called on NULL
git-svn-id: http://svn.drobilla.net/lad/trunk/suil@3389 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/host.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -36,8 +36,10 @@ SUIL_API void suil_host_free(SuilHost* host) { - if (host->gtk_lib) { - dlclose(host->gtk_lib); + if (host) { + if (host->gtk_lib) { + dlclose(host->gtk_lib); + } + free(host); } - free(host); } |