patch 8.1.1259: crash when exiting early

Problem:    Crash when exiting early. (Ralf Schandl)
Solution:   Only pop/push the title when it was set. (closes #4334)
diff --git a/src/usercmd.c b/src/usercmd.c
index 37c519d..ca01a3c 100644
--- a/src/usercmd.c
+++ b/src/usercmd.c
@@ -1045,7 +1045,8 @@
 ex_comclear(exarg_T *eap UNUSED)
 {
     uc_clear(&ucmds);
-    uc_clear(&curbuf->b_ucmds);
+    if (curbuf != NULL)
+	uc_clear(&curbuf->b_ucmds);
 }
 
 /*