From 45d7e1e131c1b59756cb7cbffb5aad02c55ad3f4 Mon Sep 17 00:00:00 2001 From: Frederic Culot Date: Sat, 16 Feb 2008 13:14:04 +0000 Subject: bugfix: check for null pointer added when drawing color configuration window (which could remain invisible otherwise) --- src/custom.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/custom.c b/src/custom.c index c3675df..2f17391 100755 --- a/src/custom.c +++ b/src/custom.c @@ -1,4 +1,4 @@ -/* $calcurse: custom.c,v 1.17 2007/10/21 13:41:02 culot Exp $ */ +/* $calcurse: custom.c,v 1.18 2008/02/16 13:14:04 culot Exp $ */ /* * Calcurse - text-based organizer @@ -450,7 +450,8 @@ display_color_config(window_t *cwin, int *mark_fore, int *mark_back, } if (need_reset) { - delwin(cwin->p); + if (cwin->p != NULL) + delwin(cwin->p); snprintf(label, BUFSIZ, _("CalCurse %s | color theme"), VERSION); custom_confwin_init(cwin, label); @@ -543,6 +544,7 @@ custom_color_config(void) cursor = 0; need_reset = 1; theme_changed = 0; + conf_win.p = NULL; display_color_config(&conf_win, &mark_fore, &mark_back, cursor, need_reset, theme_changed); -- cgit v1.2.3