<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">[PATCH] Cmd_FindCompletions fix

Check that the command actually has a completion function before trying to
call it...

diff -urN a/NQ/cmd.c head/NQ/cmd.c
--- a/NQ/cmd.c	2006-02-21 21:30:43.000000000 +1030
+++ head/NQ/cmd.c	2006-02-25 11:00:13.000000000 +1030
@@ -689,7 +689,7 @@
     struct stree_root *root = NULL;
 
     cmd = Cmd_FindCommand(name);
-    if (cmd)
+    if (cmd &amp;&amp; cmd-&gt;completion)
 	root = cmd-&gt;completion(buf);
 
     return root;
diff -urN a/QW/common/cmd.c head/QW/common/cmd.c
--- a/QW/common/cmd.c	2006-02-21 21:30:43.000000000 +1030
+++ head/QW/common/cmd.c	2006-02-25 12:16:34.000000000 +1030
@@ -729,7 +729,7 @@
     struct stree_root *root = NULL;
 
     cmd = Cmd_FindCommand(name);
-    if (cmd)
+    if (cmd &amp;&amp; cmd-&gt;completion)
 	root = cmd-&gt;completion(buf);
 
     return root;
</pre></body></html>