[hotssh] tab: Be robust against NULL hostnames in model
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hotssh] tab: Be robust against NULL hostnames in model
- Date: Mon, 2 Dec 2013 20:37:21 +0000 (UTC)
commit b6b37a94f6b03c431aaf4c7ffb8f5e205b31c8e6
Author: Colin Walters <walters verbum org>
Date: Mon Dec 2 15:35:17 2013 -0500
tab: Be robust against NULL hostnames in model
Since this happens when we've just added one.
src/hotssh-tab.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/hotssh-tab.c b/src/hotssh-tab.c
index be58e53..a0851b4 100644
--- a/src/hotssh-tab.c
+++ b/src/hotssh-tab.c
@@ -750,6 +750,9 @@ host_entry_match (GtkEntryCompletion *completion,
gs_free char *host = NULL;
GtkTreeModel *model = gtk_entry_completion_get_model (completion);
+ if (host == NULL)
+ return FALSE;
+
gtk_tree_model_get (model, iter, 0, &host, -1);
return g_str_has_prefix (host, key);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]