diff options
Diffstat (limited to 'widgets/table')
-rw-r--r-- | widgets/table/e-table-item.c | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index 927e0f434b..d835ae6d11 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -1373,15 +1373,18 @@ eti_destroy (GtkObject *object) eti->height_cache_idle_count = 0; e_canvas_hide_tooltip (E_CANVAS(GNOME_CANVAS_ITEM(eti)->canvas)); - if (eti->tooltip->background) - gdk_color_free (eti->tooltip->background); - if (eti->tooltip->foreground) - gdk_color_free (eti->tooltip->foreground); - if (eti->tooltip->timer) { - gtk_timeout_remove (eti->tooltip->timer); - eti->tooltip->timer = 0; + if (eti->tooltip) { + if (eti->tooltip->background) + gdk_color_free (eti->tooltip->background); + if (eti->tooltip->foreground) + gdk_color_free (eti->tooltip->foreground); + if (eti->tooltip->timer) { + gtk_timeout_remove (eti->tooltip->timer); + eti->tooltip->timer = 0; + } + g_free (eti->tooltip); } - g_free (eti->tooltip); + eti->tooltip = NULL; if (GTK_OBJECT_CLASS (eti_parent_class)->destroy) (*GTK_OBJECT_CLASS (eti_parent_class)->destroy) (object); @@ -1673,6 +1676,20 @@ eti_unrealize (GnomeCanvasItem *item) eti->height_cache = NULL; eti->height_cache_idle_count = 0; + e_canvas_hide_tooltip (E_CANVAS(GNOME_CANVAS_ITEM(eti)->canvas)); + if (eti->tooltip->background) { + gdk_color_free (eti->tooltip->background); + eti->tooltip->background = NULL; + } + if (eti->tooltip->foreground) { + gdk_color_free (eti->tooltip->foreground); + eti->tooltip->foreground = NULL; + } + if (eti->tooltip->timer) { + gtk_timeout_remove (eti->tooltip->timer); + eti->tooltip->timer = 0; + } + gdk_gc_unref (eti->fill_gc); eti->fill_gc = NULL; gdk_gc_unref (eti->grid_gc); |