From 407e957c04fa76e1ce195bb5f6392e49a3b013ed Mon Sep 17 00:00:00 2001 From: Kristian Rietveld Date: Sat, 11 Oct 2003 17:10:37 +0000 Subject: [PATCH] Check if completion is non-NULL before accessing it. Oops. Sat Oct 11 19:09:05 2003 Kristian Rietveld * gtk/gtkentry.c (gtk_entry_set_text): Check if completion is non-NULL before accessing it. Oops. --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-4 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ gtk/gtkentry.c | 6 ++++-- 6 files changed, 29 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ce273f046e..67208be49a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Oct 11 19:09:05 2003 Kristian Rietveld + + * gtk/gtkentry.c (gtk_entry_set_text): Check if completion is + non-NULL before accessing it. Oops. + Sat Oct 11 15:47:03 2003 Kristian Rietveld * gtk/gtkentrycompletion.[ch] (gtk_entry_completion_insert_action), diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index ce273f046e..67208be49a 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +Sat Oct 11 19:09:05 2003 Kristian Rietveld + + * gtk/gtkentry.c (gtk_entry_set_text): Check if completion is + non-NULL before accessing it. Oops. + Sat Oct 11 15:47:03 2003 Kristian Rietveld * gtk/gtkentrycompletion.[ch] (gtk_entry_completion_insert_action), diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index ce273f046e..67208be49a 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +Sat Oct 11 19:09:05 2003 Kristian Rietveld + + * gtk/gtkentry.c (gtk_entry_set_text): Check if completion is + non-NULL before accessing it. Oops. + Sat Oct 11 15:47:03 2003 Kristian Rietveld * gtk/gtkentrycompletion.[ch] (gtk_entry_completion_insert_action), diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index ce273f046e..67208be49a 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +Sat Oct 11 19:09:05 2003 Kristian Rietveld + + * gtk/gtkentry.c (gtk_entry_set_text): Check if completion is + non-NULL before accessing it. Oops. + Sat Oct 11 15:47:03 2003 Kristian Rietveld * gtk/gtkentrycompletion.[ch] (gtk_entry_completion_insert_action), diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index ce273f046e..67208be49a 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +Sat Oct 11 19:09:05 2003 Kristian Rietveld + + * gtk/gtkentry.c (gtk_entry_set_text): Check if completion is + non-NULL before accessing it. Oops. + Sat Oct 11 15:47:03 2003 Kristian Rietveld * gtk/gtkentrycompletion.[ch] (gtk_entry_completion_insert_action), diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 268d35dc33..215748e000 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -3453,7 +3453,8 @@ gtk_entry_set_text (GtkEntry *entry, g_return_if_fail (text != NULL); completion = gtk_entry_get_completion (entry); - g_signal_handler_block (entry, completion->priv->changed_id); + if (completion) + g_signal_handler_block (entry, completion->priv->changed_id); /* Actually setting the text will affect the cursor and selection; * if the contents don't actually change, this will look odd to the user. @@ -3466,7 +3467,8 @@ gtk_entry_set_text (GtkEntry *entry, tmp_pos = 0; gtk_editable_insert_text (GTK_EDITABLE (entry), text, strlen (text), &tmp_pos); - g_signal_handler_unblock (entry, completion->priv->changed_id); + if (completion) + g_signal_handler_unblock (entry, completion->priv->changed_id); } void