summaryrefslogtreecommitdiff
path: root/gtk/gtkentry.c
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>1998-07-17 03:56:13 +0000
committerTim Janik <timj@src.gnome.org>1998-07-17 03:56:13 +0000
commitca7b223bf0c4f81bc7845376f9ded40ede9220d6 (patch)
tree16fa9c3d20d54507b315733881ac5942d0299768 /gtk/gtkentry.c
parentca17982ed272888a5120db6951ad15e216596e30 (diff)
downloadgtk+-ca7b223bf0c4f81bc7845376f9ded40ede9220d6.tar.gz
care for the posssibility that someone destroys the entry on the
Fri Jul 17 05:30:47 1998 Tim Janik <timj@gtk.org> * gtk/gtkentry.c (gtk_entry_key_press): care for the posssibility that someone destroys the entry on the ::activate signal.
Diffstat (limited to 'gtk/gtkentry.c')
-rw-r--r--gtk/gtkentry.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 01dfffa9ec..8ca9a9e788 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -1131,7 +1131,12 @@ gtk_entry_key_press (GtkWidget *widget,
break;
}
- if (return_val && (editable->current_pos != initial_pos))
+ /* since we emit signals from within the above code,
+ * the widget might already be destroyed or at least
+ * unrealized.
+ */
+ if (GTK_WIDGET_REALIZED (editable) &&
+ return_val && (editable->current_pos != initial_pos))
{
if (extend_selection)
{