From 883087f67ecd6603eef44a401d894cae36104a19 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Wed, 9 Feb 2011 13:08:52 +0900 Subject: [PATCH] [elm_module.c] Added NULL check code. --- src/lib/elm_module.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/lib/elm_module.c b/src/lib/elm_module.c index 3b7f5ff..16d83b7 100644 --- a/src/lib/elm_module.c +++ b/src/lib/elm_module.c @@ -133,8 +133,11 @@ _elm_module_load(Elm_Module *m) } else { - dlclose(m->handle); - m->handle = NULL; + if (m->handle) + { + dlclose(m->handle); + m->handle = NULL; + } return EINA_FALSE; } } @@ -158,8 +161,11 @@ _elm_module_load(Elm_Module *m) } else { - dlclose(m->handle); - m->handle = NULL; + if (m->handle) + { + dlclose(m->handle); + m->handle = NULL; + } return EINA_FALSE; } } @@ -177,7 +183,7 @@ _elm_module_unload(Elm_Module *m) eina_stringshare_del(m->bin_dir); if (m->shutdown_func) m->shutdown_func(m); if (m->api) free(m->api); - dlclose(m->handle); + if (m->handle) dlclose(m->handle); } Elm_Module * -- 2.7.4