comparison 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
comparison
equal deleted inserted replaced
575:cc1c68737227 576:414d11df07ce
251 251
252 int nnwin_print(nn_window_t *win, const char *fmt) 252 int nnwin_print(nn_window_t *win, const char *fmt)
253 { 253 {
254 const char *s = fmt; 254 const char *s = fmt;
255 int col = 0; 255 int col = 0;
256
257 if (win == NULL)
258 return -16;
256 259
257 while (*s) 260 while (*s)
258 { 261 {
259 if (win->line == NULL) 262 if (win->line == NULL)
260 { 263 {