From 81ef262dff1677e8649c65c4b6961fa3e8457352 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 10 Feb 2006 19:21:58 +0000 Subject: [PATCH] Guard against NULL. (#330177, Raphael Slinckx) 2006-02-10 Matthias Clasen * gtk/gtkentrycompletion.c (gtk_entry_completion_match_selected): Guard against NULL. (#330177, Raphael Slinckx) --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ gtk/gtkentrycompletion.c | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3376920bac..56c3f1f5af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-02-10 Matthias Clasen + + * gtk/gtkentrycompletion.c (gtk_entry_completion_match_selected): + Guard against NULL. (#330177, Raphael Slinckx) + 2006-02-10 Murray Cumming * docs/reference/gtk/tmpl/gtkcomboboxentry.sgml: Mention that diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 3376920bac..56c3f1f5af 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2006-02-10 Matthias Clasen + + * gtk/gtkentrycompletion.c (gtk_entry_completion_match_selected): + Guard against NULL. (#330177, Raphael Slinckx) + 2006-02-10 Murray Cumming * docs/reference/gtk/tmpl/gtkcomboboxentry.sgml: Mention that diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c index 34f4102f43..bd6d3cedc0 100644 --- a/gtk/gtkentrycompletion.c +++ b/gtk/gtkentrycompletion.c @@ -1487,7 +1487,7 @@ gtk_entry_completion_match_selected (GtkEntryCompletion *completion, gchar *str = NULL; gtk_tree_model_get (model, iter, completion->priv->text_column, &str, -1); - gtk_entry_set_text (GTK_ENTRY (completion->priv->entry), str); + gtk_entry_set_text (GTK_ENTRY (completion->priv->entry), str ? str : ""); /* move cursor to the end */ gtk_editable_set_position (GTK_EDITABLE (completion->priv->entry), -1);