From a01751b83a74b5f9f42e5f960b2cdb20e546133b Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Sun, 17 Nov 2002 05:29:05 +0000 Subject: check for table->table_canvas == NULL. 2002-11-16 Chris Toshok * e-table.c (set_scroll_adjustments): check for table->table_canvas == NULL. * e-table-item.c (eti_dispose): guard eti->tooltip. svn path=/trunk/; revision=18807 --- widgets/table/e-table-item.c | 24 +++++++++++++----------- widgets/table/e-table.c | 10 ++++++---- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index f518b1e238..a8a80248e6 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -1725,17 +1725,19 @@ eti_unrealize (GnomeCanvasItem *item) 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; + if (eti->tooltip) { + 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); diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 6b68e3f033..ad8e10aa81 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -2146,10 +2146,12 @@ set_scroll_adjustments (ETable *table, gtk_adjustment_changed(hadjustment); } - gtk_layout_set_hadjustment (GTK_LAYOUT(table->table_canvas), - hadjustment); - gtk_layout_set_vadjustment (GTK_LAYOUT(table->table_canvas), - vadjustment); + if (table->table_canvas != NULL) { + gtk_layout_set_hadjustment (GTK_LAYOUT(table->table_canvas), + hadjustment); + gtk_layout_set_vadjustment (GTK_LAYOUT(table->table_canvas), + vadjustment); + } if (table->header_canvas != NULL) gtk_layout_set_hadjustment (GTK_LAYOUT(table->header_canvas), -- cgit v1.2.3