23997: don't delete color pair hash on module unload unless it's been previously initialized.

This commit is contained in:
Clint Adams 2007-10-19 20:21:28 +00:00
parent 87e5a95601
commit c32078a813
2 changed files with 6 additions and 2 deletions

View file

@ -1,5 +1,8 @@
2007-10-19 Clint Adams <clint@zsh.org>
* 23997: Src/Modules/curses.c: don't delete color pair hash
on module unload unless it's been previously initialized.
* 23994: Completion/Unix/Command/_git: tweaks for 23993.
* Mikael Magnusson: 23993: Completion/Unix/Command/_git: improved

View file

@ -58,7 +58,7 @@ static WINDOW *win_zero;
static struct ttyinfo saved_tty_state;
static struct ttyinfo curses_tty_state;
static LinkList zcurses_windows;
static HashTable zcurses_colorpairs;
static HashTable zcurses_colorpairs = NULL;
#define ZCURSES_ERANGE 1
#define ZCURSES_EDEFINED 2
@ -599,7 +599,8 @@ int
cleanup_(Module m)
{
freelinklist(zcurses_windows, (FreeFunc) zcurses_free_window);
deletehashtable(zcurses_colorpairs);
if (zcurses_colorpairs)
deletehashtable(zcurses_colorpairs);
return setfeatureenables(m, &module_features, NULL);
}