ncurses 6.0 - patch 20151226
[ncurses.git] / test / test_addstr.c
index a6876a89bf352bb1aa74930979dd634a4ba1b169..a14cdedcc9e04f05956e4d6cdbb38c9a42f7f095 100644 (file)
@@ -26,7 +26,7 @@
  * authorization.                                                           *
  ****************************************************************************/
 /*
  * authorization.                                                           *
  ****************************************************************************/
 /*
- * $Id: test_addstr.c,v 1.9 2012/11/24 19:49:02 tom Exp $
+ * $Id: test_addstr.c,v 1.10 2012/12/16 00:14:10 tom Exp $
  *
  * Demonstrate the waddstr() and waddch functions.
  * Thomas Dickey - 2009/9/12
  *
  * Demonstrate the waddstr() and waddch functions.
  * Thomas Dickey - 2009/9/12
@@ -213,11 +213,13 @@ test_adds(int level)
        case key_RECUR:
            test_adds(level + 1);
 
        case key_RECUR:
            test_adds(level + 1);
 
-           touchwin(look);
+           if (look)
+               touchwin(look);
            touchwin(work);
            touchwin(show);
 
            touchwin(work);
            touchwin(show);
 
-           wnoutrefresh(look);
+           if (look)
+               wnoutrefresh(look);
            wnoutrefresh(work);
            wnoutrefresh(show);
 
            wnoutrefresh(work);
            wnoutrefresh(show);