diff options
Diffstat (limited to 'widgets/table')
-rw-r--r-- | widgets/table/e-table-group-leaf.c | 6 | ||||
-rw-r--r-- | widgets/table/e-table-group.c | 9 |
2 files changed, 10 insertions, 5 deletions
diff --git a/widgets/table/e-table-group-leaf.c b/widgets/table/e-table-group-leaf.c index 2e939453d7..a56fb3db6b 100644 --- a/widgets/table/e-table-group-leaf.c +++ b/widgets/table/e-table-group-leaf.c @@ -37,8 +37,10 @@ static void etgl_destroy (GtkObject *object) { ETableGroupLeaf *etgl = E_TABLE_GROUP_LEAF(object); - gtk_object_unref(GTK_OBJECT(etgl->subset)); - gtk_object_destroy(GTK_OBJECT(etgl->item)); + if ( etgl->subset ) + gtk_object_unref(GTK_OBJECT(etgl->subset)); + if ( etgl->item ) + gtk_object_destroy(GTK_OBJECT(etgl->item)); if ( GTK_OBJECT_CLASS (etgl_parent_class)->destroy ) GTK_OBJECT_CLASS (etgl_parent_class)->destroy (object); } diff --git a/widgets/table/e-table-group.c b/widgets/table/e-table-group.c index 6ae8a25db7..ef89efd9bd 100644 --- a/widgets/table/e-table-group.c +++ b/widgets/table/e-table-group.c @@ -69,9 +69,12 @@ static void etg_destroy (GtkObject *object) { ETableGroup *etg = E_TABLE_GROUP(object); - gtk_object_unref(GTK_OBJECT(etg->header)); - gtk_object_unref(GTK_OBJECT(etg->full_header)); - gtk_object_unref(GTK_OBJECT(etg->model)); + if ( etg->header ) + gtk_object_unref(GTK_OBJECT(etg->header)); + if ( etg->full_header ) + gtk_object_unref(GTK_OBJECT(etg->full_header)); + if ( etg->model ) + gtk_object_unref(GTK_OBJECT(etg->model)); if ( GTK_OBJECT_CLASS (etg_parent_class)->destroy ) GTK_OBJECT_CLASS (etg_parent_class)->destroy (object); } |