diff options
Diffstat (limited to 'widgets/misc/e-canvas-background.c')
-rw-r--r-- | widgets/misc/e-canvas-background.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/widgets/misc/e-canvas-background.c b/widgets/misc/e-canvas-background.c index d224ab6cd9..b3582cecbb 100644 --- a/widgets/misc/e-canvas-background.c +++ b/widgets/misc/e-canvas-background.c @@ -427,8 +427,11 @@ static void ecb_style_set (ECanvasBackground *ecb, GtkStyle *previous_style) { GnomeCanvasItem *item = GNOME_CANVAS_ITEM (ecb); - gdk_gc_set_foreground (ecb->priv->gc, >K_WIDGET(item->canvas)->style->base[GTK_STATE_NORMAL]); - gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (ecb)); + + if (GTK_WIDGET_REALIZED (item->canvas)) { + gdk_gc_set_foreground (ecb->priv->gc, >K_WIDGET(item->canvas)->style->base[GTK_STATE_NORMAL]); + gnome_canvas_item_request_update (GNOME_CANVAS_ITEM (ecb)); + } } static void |