From 5f8106554738df91444ecd8af1c2c5d318ff4326 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 4 Jan 2012 00:09:39 +0000 Subject: Fix errors on clode with Qt4 in Gtk2 wrapper. git-svn-id: http://svn.drobilla.net/lad/trunk/suil@3914 a436a847-0d15-0410-975c-d299462d15a1 --- src/instance.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/instance.c') diff --git a/src/instance.c b/src/instance.c index 2bce3f6..92c61f9 100644 --- a/src/instance.c +++ b/src/instance.c @@ -232,15 +232,14 @@ void suil_instance_free(SuilInstance* instance) { if (instance) { + if (instance->wrapper) { + instance->wrapper->free(instance->wrapper); + dlclose(instance->wrapper->lib); + } if (instance->handle) { instance->descriptor->cleanup(instance->handle); } dlclose(instance->lib_handle); - if (instance->wrapper) { - void* lib = instance->wrapper->lib; - instance->wrapper->free(instance->wrapper); - dlclose(lib); - } free(instance); } } -- cgit v1.2.1