summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2015-11-12 08:39:46 +0200
committerDaniel Zaoui <daniel.zaoui@samsung.com>2015-11-12 08:39:46 +0200
commit779b834c8d4a7ffbbd4c60d46397c0ed78e0715d (patch)
treeb5891f23b2b68959addf81bffd70d4edad5e650c
parent3ecd85e71eeead169bbd2d69b7631f22a02afdc2 (diff)
Clouseau: handle case when the library is not installed
Eina module errors are printed on the screen when the library is not installed in the system and Clouseau debug is enabled. The module pointer is not NULL checked, leading to an error message when trying to load this NULL module. @fix
-rw-r--r--src/lib/elm_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/elm_main.c b/src/lib/elm_main.c
index af147bded..9ad2e8df5 100644
--- a/src/lib/elm_main.c
+++ b/src/lib/elm_main.c
@@ -248,10 +248,10 @@ _elm_clouseau_reload()
248 248
249 _clouseau_info.handle = eina_module_new( 249 _clouseau_info.handle = eina_module_new(
250 PACKAGE_LIB_DIR "/libclouseau" LIBEXT); 250 PACKAGE_LIB_DIR "/libclouseau" LIBEXT);
251 if (!eina_module_load(_clouseau_info.handle)) 251 if (!_clouseau_info.handle || !eina_module_load(_clouseau_info.handle))
252 { 252 {
253 WRN("Failed loading the clouseau library."); 253 WRN("Failed loading the clouseau library.");
254 eina_module_free(_clouseau_info.handle); 254 if (_clouseau_info.handle) eina_module_free(_clouseau_info.handle);
255 _clouseau_info.handle = NULL; 255 _clouseau_info.handle = NULL;
256 return EINA_FALSE; 256 return EINA_FALSE;
257 } 257 }