# HG changeset patch # User Matti Hamalainen # Date 1217821451 -10800 # Node ID 67ec4073e38c59ce364138207e0e23ecd9652bc0 # Parent 9b429b2837863b8ed2fc65e9e59d676977880015 Check for NULL pointers (fixes "daemon" mode) diff -r 9b429b283786 -r 67ec4073e38c nnchat.c --- a/nnchat.c Sun Aug 03 12:02:03 2008 +0300 +++ b/nnchat.c Mon Aug 04 06:44:11 2008 +0300 @@ -249,6 +249,8 @@ time_t timeStamp; struct tm *tmpTime;; + if (statusWin == NULL) return; + timeStamp = time(NULL); if ((tmpTime = localtime(&timeStamp)) != NULL) { strftime(tmpStr, sizeof(tmpStr), "%H:%M:%S", tmpTime); @@ -286,6 +288,8 @@ void printEditBuf(char *str, editbuf_t *buf) { + if (statusWin == NULL || buf == NULL) return; + buf->data[buf->len] = 0; werase(editWin);