[hotssh] tab: Be robust against NULL hostnames in model



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]