emotion modules -0 check return value of eina_module_load and print err
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Mon, 8 Aug 2016 05:49:35 +0000 (14:49 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Mon, 8 Aug 2016 08:47:14 +0000 (17:47 +0900)
this should inform the user via eina log errors that a module load
failed. this fixes CID 1360954

src/lib/emotion/emotion_modules.c

index 590a61f..346523f 100644 (file)
@@ -370,7 +370,11 @@ emotion_engine_instance_new(const char *name, Evas_Object *obj, Emotion_Module_O
    if (name)
      {
         m = _find_mod(name);
-        if (m) eina_module_load(m);
+        if (m)
+          {
+             if (!eina_module_load(m))
+               ERR("Cannot load module %s", eina_module_file_get(m));
+          }
      }
 
    if (!_emotion_engine_registry)
@@ -380,7 +384,8 @@ emotion_engine_instance_new(const char *name, Evas_Object *obj, Emotion_Module_O
         if (!m) m = _find_mod("gstreamer");
         if (!m) m = _find_mod("gstreamer1");
         if (!m) m = _find_mod("libvlc");
-        if (m) eina_module_load(m);
+        if (!eina_module_load(m))
+          ERR("Cannot load module %s", eina_module_file_get(m));
      }
 
    if (name)