From: Owen Taylor Date: Thu, 16 Nov 2000 16:09:47 +0000 (+0000) Subject: If loading the module fails, don't increment the use count. X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=bf25038c090bb74206e26ed7962613647458a44e;p=dana%2Fcg-glib.git If loading the module fails, don't increment the use count. Wed Nov 15 20:58:05 2000 Owen Taylor * gtypemodule.c (g_type_module_use): If loading the module fails, don't increment the use count. --- diff --git a/gobject/ChangeLog b/gobject/ChangeLog index 0cb5c6a4..0911c3ae 100644 --- a/gobject/ChangeLog +++ b/gobject/ChangeLog @@ -1,3 +1,8 @@ +Wed Nov 15 20:58:05 2000 Owen Taylor + + * gtypemodule.c (g_type_module_use): If loading the + module fails, don't increment the use count. + Thu Nov 9 01:49:43 2000 Tim Janik * gobject.h (G_WARN_INVALID_PARAM_ID): doh, diff --git a/gobject/gtypemodule.c b/gobject/gtypemodule.c index 4e5848e9..cef74999 100644 --- a/gobject/gtypemodule.c +++ b/gobject/gtypemodule.c @@ -204,7 +204,10 @@ g_type_module_use (GTypeModule *module) GSList *tmp_list; if (!G_TYPE_MODULE_GET_CLASS (module)->load (module)) - return FALSE; + { + module->use_count--; + return FALSE; + } tmp_list = module->type_infos; while (tmp_list)