]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/lib_termcap.c
ncurses 5.6 - patch 20080503
[ncurses.git] / ncurses / tinfo / lib_termcap.c
index 8459266b5be312dab6804d39b754374d58725ade..ff97eea920f82b0be955a429302474d9e0b3f866 100644 (file)
@@ -45,7 +45,7 @@
 
 #include <term_entry.h>
 
-MODULE_ID("$Id: lib_termcap.c,v 1.60 2007/04/21 22:23:46 tom Exp $")
+MODULE_ID("$Id: lib_termcap.c,v 1.61 2007/06/02 19:36:03 tom Exp $")
 
 NCURSES_EXPORT_VAR(char *) UP = 0;
 NCURSES_EXPORT_VAR(char *) BC = 0;
@@ -283,7 +283,8 @@ _nc_tgetent_leaks(void)
 {
     for (CacheInx = 0; CacheInx < TGETENT_MAX; ++CacheInx) {
        FreeIfNeeded(FIX_SGR0);
-       del_curterm(LAST_TRM);
+       if (LAST_TRM != 0)
+           del_curterm(LAST_TRM);
     }
 }
 #endif