mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-30 07:10:58 +02:00
fix crash when colo[u]r is not available in curses
This commit is contained in:
parent
d18abd1203
commit
8fe09747d8
2 changed files with 7 additions and 0 deletions
|
@ -1,5 +1,8 @@
|
|||
2007-10-29 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 24029: Src/Modules/curses.c: crashed on attempt to use
|
||||
color if it wasn't available.
|
||||
|
||||
* unposted: configure.ac: remove some broken debugging.
|
||||
|
||||
2007-10-28 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue