From f5f6dc573149d961b6c5df81e391a30409b7c0a3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 11 Jun 2011 22:01:13 +0000 Subject: 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 --- src/host.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/host.c') diff --git a/src/host.c b/src/host.c index c57b1c6..9da2078 100644 --- a/src/host.c +++ b/src/host.c @@ -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); } -- cgit v1.2.1