Do not call compl_get_category_list() needlessly
authorMikael Berthe <mikael@lilotux.net>
Thu, 11 Nov 2010 21:22:06 +0100
changeset 1927 3e3e73bb43f5
parent 1926 c1f9a4d47e05
child 1928 108c34b8a161
Do not call compl_get_category_list() needlessly
mcabber/mcabber/screen.c
--- a/mcabber/mcabber/screen.c	Thu Nov 11 14:13:16 2010 +0100
+++ b/mcabber/mcabber/screen.c	Thu Nov 11 21:22:06 2010 +0100
@@ -3619,7 +3619,12 @@
 
   if (!completion_started) {
     guint dynlist;
-    GSList *list = compl_get_category_list(compl_categ, &dynlist);
+    GSList *list;
+
+    if (!compl_categ)
+      return; // Nothing to complete
+
+    list = compl_get_category_list(compl_categ, &dynlist);
     if (list) {
       guint n;
       char *prefix = g_strndup(row, ptr_inputline-row);