about summary refs log tree commit diff
path: root/Src/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Modules')
-rw-r--r--Src/Modules/curses.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Src/Modules/curses.c b/Src/Modules/curses.c
index 063ac9014..a1801e913 100644
--- a/Src/Modules/curses.c
+++ b/Src/Modules/curses.c
@@ -268,6 +268,10 @@ zcurses_colorset(const char *nam, WINDOW *w, char *colorpair)
     short f, b;
     Colorpairnode cpn;
 
+    /* zcurses_colorpairs is only initialised if color is supported */
+    if (!zcurses_colorpairs)
+	return 1;
+
     if (zc_color_phase==1 ||
 	!(cpn = (Colorpairnode) gethashnode(zcurses_colorpairs, colorpair))) {
 	zc_color_phase = 2;