summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederic Culot <calcurse@culot.org>2008-02-16 13:14:04 +0000
committerFrederic Culot <calcurse@culot.org>2008-02-16 13:14:04 +0000
commit45d7e1e131c1b59756cb7cbffb5aad02c55ad3f4 (patch)
tree95fffeb488c37042ae618240bd8838a09e0112f0
parent120de530e08294083b6015635d5477a43bae1b6a (diff)
downloadcalcurse-45d7e1e131c1b59756cb7cbffb5aad02c55ad3f4.zip
bugfix: check for null pointer added when drawing color configuration window (which could remain invisible otherwise)
-rwxr-xr-xsrc/custom.c6
1 files 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);