diff options
Diffstat (limited to 'composer/e-composer-private.c')
-rw-r--r-- | composer/e-composer-private.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c index ed9e19096f..d4dcb46126 100644 --- a/composer/e-composer-private.c +++ b/composer/e-composer-private.c @@ -405,17 +405,22 @@ e_composer_private_constructed (EMsgComposer *composer) void e_composer_private_dispose (EMsgComposer *composer) { - GConfBridge *bridge; - GArray *array; - guint binding_id; - - bridge = gconf_bridge_get (); - array = composer->priv->gconf_bridge_binding_ids; + if (composer->priv->gconf_bridge_binding_ids) { + GConfBridge *bridge; + GArray *array; + guint binding_id; + + bridge = gconf_bridge_get (); + array = composer->priv->gconf_bridge_binding_ids; + + while (array->len > 0) { + binding_id = g_array_index (array, guint, 0); + gconf_bridge_unbind (bridge, binding_id); + g_array_remove_index_fast (array, 0); + } - while (array->len > 0) { - binding_id = g_array_index (array, guint, 0); - gconf_bridge_unbind (bridge, binding_id); - g_array_remove_index_fast (array, 0); + g_array_free (composer->priv->gconf_bridge_binding_ids, TRUE); + composer->priv->gconf_bridge_binding_ids = NULL; } if (composer->priv->shell != NULL) { |