patch 8.2.2148: Vim9: crash when user command doesn't match

Problem:    Vim9: crash when user command doesn't match.
Solution:   Adjust command index. (closes #7479)
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index b084822..152eda6 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -3520,7 +3520,7 @@
 		++p;
 	    p = find_ucmd(eap, p, full, NULL, NULL);
 	}
-	if (p == eap->cmd)
+	if (p == NULL || p == eap->cmd)
 	    eap->cmdidx = CMD_SIZE;
     }