diff main.c @ 576:414d11df07ce

Gracefully handle error situations when the main UI has not yet been initialized properly.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 30 Dec 2012 08:12:38 +0200
parents 699147b1bbbc
children 06675b69ca6c
line wrap: on
line diff
--- a/main.c	Thu Dec 13 15:50:54 2012 +0200
+++ b/main.c	Sun Dec 30 08:12:38 2012 +0200
@@ -259,7 +259,7 @@
     nn_window_t *tmpwin = (win != NULL) ? win : nnwin_main_window();
 
     // Only the main window 
-    if (win == NULL && (flags & LOG_RECURSIVE) == 0)
+    if (win == NULL && tmpwin != NULL && (flags & LOG_RECURSIVE) == 0)
     {
         time_t currTime = time(NULL);
         struct tm *currTm, *prevTm;