]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sys_shared.c
cmd: Reimplement console buffer system as a cyclic doubly linked list
[xonotic/darkplaces.git] / sys_shared.c
index 0f7e0bdd01f9a6b8d69da8733e60da4b81f9658d..468037be84637c4b25839242658f505dba6fd8ce 100644 (file)
@@ -48,10 +48,10 @@ char *Sys_TimeString(const char *timeformat)
 void Sys_Quit (int returnvalue)
 {
        // Unlock mutexes because the quit command may jump directly here, causing a deadlock
-       if (cmd_client.text_mutex)
-               Cbuf_Unlock(&cmd_client);
-       if (cmd_server.text_mutex)
-               Cbuf_Unlock(&cmd_server);
+       if ((&cmd_client)->cbuf->lock)
+               Cbuf_Unlock((&cmd_client)->cbuf);
+       if ((&cmd_server)->cbuf->lock)
+               Cbuf_Unlock((&cmd_server)->cbuf);
        SV_UnlockThreadMutex();
        TaskQueue_Frame(true);