]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/ins_wide.c
ncurses 5.9 - patch 20140719
[ncurses.git] / test / ins_wide.c
index 07af7eda0ad360a84c88e5dd32b9b90812203081..a168dc112fcb52c73b9b3108abc920f442707505 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: ins_wide.c,v 1.18 2012/11/24 19:57:17 tom Exp $
+ * $Id: ins_wide.c,v 1.20 2012/12/16 00:51:02 tom Exp $
  *
  * Demonstrate the wins_wstr() and wins_wch functions.
  * Thomas Dickey - 2002/11/23
@@ -294,11 +294,13 @@ test_inserts(int level)
        case key_RECUR:
            test_inserts(level + 1);
 
-           touchwin(look);
+           if (look)
+               touchwin(look);
            touchwin(work);
            touchwin(show);
 
-           wnoutrefresh(look);
+           if (look)
+               wnoutrefresh(look);
            wnoutrefresh(work);
            wnoutrefresh(show);
 
@@ -442,10 +444,10 @@ test_inserts(int level)
        }
     }
     if (level > 0) {
-       delwin(show);
        delwin(work);
        delwin(look);
     }
+    delwin(show);
 }
 
 static void