aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
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
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')
-rw-r--r--calendar/ChangeLog17
-rw-r--r--calendar/gui/calendar-offline-handler.c10
-rw-r--r--calendar/gui/e-alarm-list.c3
-rw-r--r--calendar/gui/e-comp-editor-registry.c28
-rw-r--r--calendar/gui/e-date-time-list.c3
-rw-r--r--calendar/gui/e-meeting-attendee.c3
-rw-r--r--calendar/gui/e-meeting-model.c3
7 files changed, 56 insertions, 11 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 1988d6ad2a..53a8e4db3a 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,20 @@
+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.
+
2003-08-12 Andrew Wu <Yang.Wu@sun.com>
* gui/e-day-view.c
diff --git a/calendar/gui/calendar-offline-handler.c b/calendar/gui/calendar-offline-handler.c
index 894f3cf560..fd59965283 100644
--- a/calendar/gui/calendar-offline-handler.c
+++ b/calendar/gui/calendar-offline-handler.c
@@ -258,7 +258,10 @@ impl_dispose (GObject *object)
offline_handler = CALENDAR_OFFLINE_HANDLER (object);
priv = offline_handler->priv;
- g_object_unref (priv->client);
+ if (priv->client) {
+ g_object_unref (priv->client);
+ priv->client = NULL;
+ }
if (priv->listener_interface != CORBA_OBJECT_NIL) {
CORBA_Environment ev;
@@ -270,6 +273,8 @@ impl_dispose (GObject *object)
priv->listener_interface = CORBA_OBJECT_NIL;
}
+ if (G_OBJECT_CLASS (parent_class)->dispose)
+ (* G_OBJECT_CLASS (parent_class)->dispose) (object);
}
static void
@@ -282,6 +287,9 @@ impl_finalize (GObject *object)
priv = offline_handler->priv;
g_free (priv);
+
+ if (G_OBJECT_CLASS (parent_class)->finalize)
+ (* G_OBJECT_CLASS (parent_class)->finalize) (object);
}
/* GTK+ type initialization. */
diff --git a/calendar/gui/e-alarm-list.c b/calendar/gui/e-alarm-list.c
index 469d6de66f..534a8c9449 100644
--- a/calendar/gui/e-alarm-list.c
+++ b/calendar/gui/e-alarm-list.c
@@ -225,6 +225,9 @@ static void
e_alarm_list_finalize (GObject *object)
{
EAlarmList *alarm_list = E_ALARM_LIST (object);
+
+ if (G_OBJECT_CLASS (parent_class)->finalize)
+ (* G_OBJECT_CLASS (parent_class)->finalize) (object);
}
/* Fulfill the GtkTreeModel requirements */
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);
+ }
+}
diff --git a/calendar/gui/e-date-time-list.c b/calendar/gui/e-date-time-list.c
index 6a6848fc25..5aef6f9c51 100644
--- a/calendar/gui/e-date-time-list.c
+++ b/calendar/gui/e-date-time-list.c
@@ -223,6 +223,9 @@ static void
e_date_time_list_finalize (GObject *object)
{
EDateTimeList *date_time_list = E_DATE_TIME_LIST (object);
+
+ if (G_OBJECT_CLASS (parent_class)->finalize)
+ (* G_OBJECT_CLASS (parent_class)->finalize) (object);
}
/* Fulfill the GtkTreeModel requirements */
diff --git a/calendar/gui/e-meeting-attendee.c b/calendar/gui/e-meeting-attendee.c
index f25dbc35de..8b988f085f 100644
--- a/calendar/gui/e-meeting-attendee.c
+++ b/calendar/gui/e-meeting-attendee.c
@@ -187,6 +187,9 @@ finalize (GObject *obj)
g_array_free (priv->busy_periods, TRUE);
g_free (priv);
+
+ if (G_OBJECT_CLASS (parent_class)->finalize)
+ (* G_OBJECT_CLASS (parent_class)->finalize) (obj);
}
GObject *
diff --git a/calendar/gui/e-meeting-model.c b/calendar/gui/e-meeting-model.c
index dddc1f2f25..a7cd54fd85 100644
--- a/calendar/gui/e-meeting-model.c
+++ b/calendar/gui/e-meeting-model.c
@@ -671,6 +671,9 @@ finalize (GObject *obj)
g_source_remove (priv->refresh_idle_id);
g_free (priv);
+
+ if (G_OBJECT_CLASS (parent_class)->finalize)
+ (* G_OBJECT_CLASS (parent_class)->finalize) (obj);
}
GtkObject *