]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/inserts.c
ncurses 5.9 - patch 20131005
[ncurses.git] / test / inserts.c
index b858668af2a028043e90f55429d2805952ecb73f..ae38fa21752167566de9d00a92f67521c916f50a 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: inserts.c,v 1.25 2012/11/24 19:57:17 tom Exp $
+ * $Id: inserts.c,v 1.27 2012/12/16 00:35:27 tom Exp $
  *
  * Demonstrate the winsstr() and winsch functions.
  * Thomas Dickey - 2002/10/19
@@ -219,11 +219,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);
 
@@ -371,10 +373,10 @@ test_inserts(int level)
        }
     }
     if (level > 0) {
-       delwin(show);
        delwin(work);
        delwin(look);
     }
+    delwin(show);
 }
 
 static void