Don't open shared libraries twice

If loading a referenced shared library succeeds, don't try loading it again.

http://bugzilla.gnome.org/show_bug.cgi?id=591737
This commit is contained in:
Owen W. Taylor 2009-08-13 15:14:49 -04:00
parent 46d5a2392d
commit 90de854ee5

View File

@ -1997,8 +1997,10 @@ _g_typelib_init (GTypelib *typelib)
g_string_append (shlib_full, ".la");
module = g_module_open (shlib_full->str, G_MODULE_BIND_LAZY);
if (module == NULL)
g_string_overwrite (shlib_full, strlen (shlib_full->str)-2, SHLIB_SUFFIX);
module = g_module_open (shlib_full->str, G_MODULE_BIND_LAZY);
{
g_string_overwrite (shlib_full, strlen (shlib_full->str)-2, SHLIB_SUFFIX);
module = g_module_open (shlib_full->str, G_MODULE_BIND_LAZY);
}
g_string_free (shlib_full, TRUE);
}