[FIXME: On NetBSD, dlsym() doesn't set errno != 0 when the system cannot be
authorMartin Baulig <martin@home-of-linux.org>
Thu, 13 Jan 2000 22:11:39 +0000 (22:11 +0000)
committerMartin Baulig <martin@src.gnome.org>
Thu, 13 Jan 2000 22:11:39 +0000 (22:11 +0000)
        found; this leads to an incorrect return value of g_module_symbol.]

2000-01-13  Martin Baulig  <martin@home-of-linux.org>

* gmodule.c (g_module_open): Check whether `check_init' is not NULL
before we attempt to call it.

gmodule/ChangeLog
gmodule/gmodule.c

index 0039146..040f881 100644 (file)
@@ -1,3 +1,8 @@
+2000-01-13  Martin Baulig  <martin@home-of-linux.org>
+
+       * gmodule.c (g_module_open): Check whether `check_init' is not NULL
+       before we attempt to call it.
+
 Sun Oct  3 19:30:52 PDT 1999 Manish Singh <yosh@gimp.org>
 
        * gmodule.h
index d2a6f99..0a4b211 100644 (file)
@@ -256,7 +256,8 @@ g_module_open (const gchar    *file_name,
       
       /* check initialization */
       if (g_module_symbol (module, "g_module_check_init", (gpointer) &check_init))
-       check_failed = check_init (module);
+        if (check_init)
+          check_failed = check_init (module);
       
       /* we don't call unload() if the initialization check failed. */
       if (!check_failed)