summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2009-08-13 15:14:49 -0400
committerOwen W. Taylor <otaylor@fishsoup.net>2009-08-13 15:56:04 -0400
commit6c33ce32ec1b760ea7ab03e3cd49b80f088c8366 (patch)
treea72d681aa9aed178f16033020f313508af43dec2
parent79cff9fbbc6e422daf1391caaa551e3a5315c0ca (diff)
downloadgobject-introspection-6c33ce32ec1b760ea7ab03e3cd49b80f088c8366.tar.gz
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
-rw-r--r--girepository/gtypelib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/girepository/gtypelib.c b/girepository/gtypelib.c
index 92df5393..a801f2be 100644
--- a/girepository/gtypelib.c
+++ b/girepository/gtypelib.c
@@ -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);
}