elm module: Added guard code.
authorDaniel Juyung Seo <seojuyung2@gmail.com>
Thu, 7 Jul 2011 14:50:50 +0000 (14:50 +0000)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Thu, 7 Jul 2011 14:50:50 +0000 (14:50 +0000)
SVN revision: 61120

src/lib/elm_module.c

index beb7161..9e65d82 100644 (file)
@@ -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;
                }
           }