]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - menu.c
MVM: fix endless loop when a command causes an error
[xonotic/darkplaces.git] / menu.c
diff --git a/menu.c b/menu.c
index 891ebe1ed6133fc95835d49db11a68b691fe83ed..92e95ed1f0b60811f5312f00636790de5bc3cb59 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -5246,6 +5246,9 @@ void MVM_error_cmd(const char *format, ...)
        // reset the active scene, too (to be on the safe side ;))
        R_SelectScene( RST_CLIENT );
 
+       // prevent an endless loop if the error was triggered by a command
+       Cbuf_Clear(cmd_local->cbuf);
+
        // Let video start at least
        Host_AbortCurrentFrame();
 }