is being freed and prints messages while doing so)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9581
d7cf8633-e32d-0410-b094-
e92efae38249
void ConBuffer_Init(conbuffer_t *buf, int textsize, int maxlines, mempool_t *mempool)
{
+ buf->active = true;
buf->textsize = textsize;
buf->text = (char *) Mem_Alloc(mempool, textsize);
buf->maxlines = maxlines;
*/
void ConBuffer_Shutdown(conbuffer_t *buf)
{
+ buf->active = false;
Mem_Free(buf->text);
Mem_Free(buf->lines);
buf->text = NULL;
char *putpos;
con_lineinfo_t *p;
+ // developer_memory 1 during shutdown prints while conbuffer_t is being freed
+ if (!buf->active)
+ return;
+
ConBuffer_FixTimes(buf);
if(len >= buf->textsize)
typedef struct conbuffer_s
{
+ qboolean active;
int textsize;
char *text;
int maxlines;