fix a couple error messages on shutdown of dedicated server
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 21 Nov 2010 12:34:31 +0000 (12:34 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 21 Nov 2010 12:34:31 +0000 (12:34 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10623 d7cf8633-e32d-0410-b094-e92efae38249

console.c

index ccdd38d..0eaccd3 100644 (file)
--- a/console.c
+++ b/console.c
@@ -126,8 +126,10 @@ ConBuffer_Shutdown
 void ConBuffer_Shutdown(conbuffer_t *buf)
 {
        buf->active = false;
-       Mem_Free(buf->text);
-       Mem_Free(buf->lines);
+       if (buf->text)
+               Mem_Free(buf->text);
+       if (buf->lines)
+               Mem_Free(buf->lines);
        buf->text = NULL;
        buf->lines = NULL;
 }