]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host.c
cbuf: recycle node after it executes, clear commands on Host_Error()
[xonotic/darkplaces.git] / host.c
diff --git a/host.c b/host.c
index 3e2c5f99075ab8e15934295b65bf84bde41d5c90..e7dd4a421b0d311a76bdd83051a632aff5b0f777 100644 (file)
--- a/host.c
+++ b/host.c
@@ -133,6 +133,9 @@ void Host_Error (const char *error, ...)
        if (cls.state == ca_dedicated)
                Sys_Error ("Host_Error: %s",hosterrorstring2);  // dedicated servers exit
 
+       // prevent an endless loop if the error was triggered by a command
+       Cbuf_Clear(cmd_local->cbuf);
+
        CL_Disconnect();
        cls.demonum = -1;