aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-canvas-vbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/misc/e-canvas-vbox.c')
-rw-r--r--widgets/misc/e-canvas-vbox.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/widgets/misc/e-canvas-vbox.c b/widgets/misc/e-canvas-vbox.c
index 2bbff343ed..8ed70d0be9 100644
--- a/widgets/misc/e-canvas-vbox.c
+++ b/widgets/misc/e-canvas-vbox.c
@@ -193,9 +193,11 @@ e_canvas_vbox_destroy (GtkObject *object)
{
ECanvasVbox *vbox = E_CANVAS_VBOX(object);
- g_list_foreach(vbox->items, disconnect_item_cb, vbox);
- g_list_free(vbox->items);
- vbox->items = NULL;
+ if (vbox->items) {
+ g_list_foreach(vbox->items, disconnect_item_cb, vbox);
+ g_list_free(vbox->items);
+ vbox->items = NULL;
+ }
GTK_OBJECT_CLASS(parent_class)->destroy (object);
}
@@ -250,8 +252,7 @@ e_canvas_vbox_realize (GnomeCanvasItem *item)
static void
e_canvas_vbox_remove_item (GnomeCanvasItem *item, ECanvasVbox *vbox)
{
- if (!GTK_OBJECT_DESTROYED (vbox))
- vbox->items = g_list_remove(vbox->items, item);
+ vbox->items = g_list_remove(vbox->items, item);
}
static void
@@ -363,14 +364,14 @@ e_canvas_vbox_reflow( GnomeCanvasItem *item, int flags )
void
e_canvas_vbox_add_item(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item)
{
- if (E_CANVAS_VBOX_CLASS(GTK_OBJECT(e_canvas_vbox)->klass)->add_item)
- (E_CANVAS_VBOX_CLASS(GTK_OBJECT(e_canvas_vbox)->klass)->add_item) (e_canvas_vbox, item);
+ if (E_CANVAS_VBOX_CLASS(GTK_OBJECT_GET_CLASS(e_canvas_vbox))->add_item)
+ (E_CANVAS_VBOX_CLASS(GTK_OBJECT_GET_CLASS(e_canvas_vbox))->add_item) (e_canvas_vbox, item);
}
void
e_canvas_vbox_add_item_start(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item)
{
- if (E_CANVAS_VBOX_CLASS(GTK_OBJECT(e_canvas_vbox)->klass)->add_item_start)
- (E_CANVAS_VBOX_CLASS(GTK_OBJECT(e_canvas_vbox)->klass)->add_item_start) (e_canvas_vbox, item);
+ if (E_CANVAS_VBOX_CLASS(GTK_OBJECT_GET_CLASS(e_canvas_vbox))->add_item_start)
+ (E_CANVAS_VBOX_CLASS(GTK_OBJECT_GET_CLASS(e_canvas_vbox))->add_item_start) (e_canvas_vbox, item);
}