From 5e56396c7a4e1366c2e69131bd7f627d600a94e7 Mon Sep 17 00:00:00 2001 From: Damon Chaplin Date: Sat, 7 Oct 2000 20:38:10 +0000 Subject: set cursors to NULL after destroying them, to avoid any possibility of 2000-10-07 Damon Chaplin * gal/e-text/e-text.c (e_text_unrealize): set cursors to NULL after destroying them, to avoid any possibility of BadCursor. (e_text_event): just return if the EText item is destroyed. svn path=/trunk/; revision=5780 --- widgets/text/e-text.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c index b740a6d36b..49108cb918 100644 --- a/widgets/text/e-text.c +++ b/widgets/text/e-text.c @@ -1545,7 +1545,9 @@ e_text_unrealize (GnomeCanvasItem *item) text->gc = NULL; gdk_cursor_destroy (text->i_cursor); + text->i_cursor = NULL; gdk_cursor_destroy (text->default_cursor); + text->default_cursor = NULL; if (parent_class->unrealize) (* parent_class->unrealize) (item); @@ -2567,6 +2569,9 @@ e_text_event (GnomeCanvasItem *item, GdkEvent *event) gint return_val = 0; + if (GTK_OBJECT_DESTROYED (item)) + return FALSE; + e_tep_event.type = event->type; switch (event->type) { case GDK_FOCUS_CHANGE: -- cgit