diff ui.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 3ae357fd34bb
children 97a49a6cc959
line wrap: on
line diff
--- a/ui.c	Thu Dec 13 15:50:54 2012 +0200
+++ b/ui.c	Sun Dec 30 08:12:38 2012 +0200
@@ -254,6 +254,9 @@
     const char *s = fmt;
     int col = 0;
     
+    if (win == NULL)
+        return -16;
+    
     while (*s)
     {
         if (win->line == NULL)