diff options
| author | Peter Stephenson <pws@users.sourceforge.net> | 2007-10-29 11:38:13 +0000 |
|---|---|---|
| committer | Peter Stephenson <pws@users.sourceforge.net> | 2007-10-29 11:38:13 +0000 |
| commit | 8fe09747d8f8036dfd3d13aa701bbbc5d530afce (patch) | |
| tree | dfb3b5760e85298347312e3f01e89a44412a33c5 /Src/Modules/curses.c | |
| parent | Remove broken curses debug (diff) | |
| download | zsh-8fe09747d8f8036dfd3d13aa701bbbc5d530afce.tar zsh-8fe09747d8f8036dfd3d13aa701bbbc5d530afce.tar.gz zsh-8fe09747d8f8036dfd3d13aa701bbbc5d530afce.tar.bz2 zsh-8fe09747d8f8036dfd3d13aa701bbbc5d530afce.tar.lz zsh-8fe09747d8f8036dfd3d13aa701bbbc5d530afce.tar.xz zsh-8fe09747d8f8036dfd3d13aa701bbbc5d530afce.tar.zst zsh-8fe09747d8f8036dfd3d13aa701bbbc5d530afce.zip | |
fix crash when colo[u]r is not available in curses
Diffstat (limited to 'Src/Modules/curses.c')
| -rw-r--r-- | Src/Modules/curses.c | 4 |
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; |
