aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-08-04 13:43:31 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-09-14 20:08:42 +0800
commite3655b5388f4136754a37784e88d8fface4a13e0 (patch)
tree4f03c9e86abfe626fd828d8f8a3ae0afaa7b0edb /e-util
parentd432b426d906d6d217ec68ea231132249e2fb38e (diff)
downloadgsoc2013-evolution-e3655b5388f4136754a37784e88d8fface4a13e0.tar.gz
gsoc2013-evolution-e3655b5388f4136754a37784e88d8fface4a13e0.tar.zst
gsoc2013-evolution-e3655b5388f4136754a37784e88d8fface4a13e0.zip
Bug #655507 - Do not unload extensions, keep them preloaded
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-extensible.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/e-util/e-extensible.c b/e-util/e-extensible.c
index a7523deb21..6e49e9dba7 100644
--- a/e-util/e-extensible.c
+++ b/e-util/e-extensible.c
@@ -94,17 +94,19 @@ extensible_load_extension (GType extension_type,
extension_class = g_type_class_ref (extension_type);
/* Only load extensions that extend the given extensible object. */
- if (!g_type_is_a (extensible_type, extension_class->extensible_type))
- goto exit;
-
- extension = g_object_new (
- extension_type, "extensible", extensible, NULL);
-
- extensions = extensible_get_extensions (extensible);
- g_ptr_array_add (extensions, extension);
-
-exit:
- g_type_class_unref (extension_class);
+ if (g_type_is_a (extensible_type, extension_class->extensible_type)) {
+ extension = g_object_new (
+ extension_type, "extensible", extensible, NULL);
+
+ extensions = extensible_get_extensions (extensible);
+ g_ptr_array_add (extensions, extension);
+
+ g_type_class_unref (extension_class);
+ } else {
+ /* keep the class referenced forever, later may anyone need it anyway,
+ and unref it may mean module unload, which breaks static strings
+ in GType */
+ }
}
static void