aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-comp-editor-registry.c
diff options
context:
space:
mode:
authorHans Petter Jansson <hpj@ximian.com>2003-08-14 15:16:16 +0800
committerHans Petter <hansp@src.gnome.org>2003-08-14 15:16:16 +0800
commit7a208fc48c41e901d527eab89cb103f3c999ad86 (patch)
treeea02a22a97ac7f31c12c6898891d3198438d1d57 /calendar/gui/e-comp-editor-registry.c
parent1f607a46c3b950f00be5190c0f803526764cb4d4 (diff)
downloadgsoc2013-evolution-7a208fc48c41e901d527eab89cb103f3c999ad86.tar
gsoc2013-evolution-7a208fc48c41e901d527eab89cb103f3c999ad86.tar.gz
gsoc2013-evolution-7a208fc48c41e901d527eab89cb103f3c999ad86.tar.bz2
gsoc2013-evolution-7a208fc48c41e901d527eab89cb103f3c999ad86.tar.lz
gsoc2013-evolution-7a208fc48c41e901d527eab89cb103f3c999ad86.tar.xz
gsoc2013-evolution-7a208fc48c41e901d527eab89cb103f3c999ad86.tar.zst
gsoc2013-evolution-7a208fc48c41e901d527eab89cb103f3c999ad86.zip
Chain. Prevent double unrefs. (impl_finalize): Chain.
2003-08-12 Hans Petter Jansson <hpj@ximian.com> * gui/calendar-offline-handler.c (impl_dispose): Chain. Prevent double unrefs. (impl_finalize): Chain. * gui/e-alarm-list.c (finalize): Chain. * gui/e-comp-editor-registry.c (destroy): Chain. Prevent double frees. (editor_destroy_cb): Don't crash if we get the destroy signal twice. * gui/e-date-time-list.c (e_date_time_list_finalize): Chain. * gui/e-meeting-attendee.c (finalize): Chain. * gui/e-meeting-model.c (finalize): Chain. svn path=/trunk/; revision=22228
Diffstat (limited to 'calendar/gui/e-comp-editor-registry.c')
-rw-r--r--calendar/gui/e-comp-editor-registry.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/calendar/gui/e-comp-editor-registry.c b/calendar/gui/e-comp-editor-registry.c
index 1e9962c26f..68b33d11ff 100644
--- a/calendar/gui/e-comp-editor-registry.c
+++ b/calendar/gui/e-comp-editor-registry.c
@@ -50,13 +50,21 @@ destroy (GtkObject *obj)
{
ECompEditorRegistry *reg;
ECompEditorRegistryPrivate *priv;
-
+
reg = E_COMP_EDITOR_REGISTRY (obj);
priv = reg->priv;
- g_hash_table_destroy (priv->editors);
-
- g_free (priv);
+ if (priv) {
+ if (priv->editors) {
+ g_hash_table_destroy (priv->editors);
+ priv->editors = NULL;
+ }
+
+ g_free (priv);
+ reg->priv = NULL;
+ }
+
+ (* GTK_OBJECT_CLASS (parent_class)->destroy) (obj);
}
static void
@@ -195,10 +203,10 @@ editor_destroy_cb (GtkWidget *widget, gpointer data)
cal_component_get_uid (comp, &uid);
rdata = g_hash_table_lookup (priv->editors, uid);
- g_assert (rdata != NULL);
-
- g_hash_table_remove (priv->editors, rdata->uid);
- g_free (rdata->uid);
- g_free (rdata);
-}
+ if (rdata != NULL) {
+ g_hash_table_remove (priv->editors, rdata->uid);
+ g_free (rdata->uid);
+ g_free (rdata);
+ }
+}