]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/dots_curses.c
ncurses 6.2 - patch 20200531
[ncurses.git] / test / dots_curses.c
index 4754e98ab2bbac13701fd164bdae3d4318caedc8..e30a24ae37205d92d68f6a6b9b167c0fb17ce31d 100644 (file)
@@ -30,7 +30,7 @@
 /*
  * Author: Thomas E. Dickey
  *
- * $Id: dots_curses.c,v 1.19 2020/05/10 00:31:59 tom Exp $
+ * $Id: dots_curses.c,v 1.20 2020/05/29 23:04:02 tom Exp $
  *
  * A simple demo of the curses interface used for comparison with termcap.
  */
@@ -206,7 +206,8 @@ main(int argc, char *argv[])
                attron(COLOR_PAIR(mypair(fg, bg)));
            } else {
                set_colors(fg, bg = z);
-               napms(s_option);
+               if (s_option)
+                   napms(s_option);
            }
        } else {
            if (ranf() <= 0.01) {
@@ -215,7 +216,8 @@ main(int argc, char *argv[])
                } else {
                    attroff(A_REVERSE);
                }
-               napms(s_option);
+               if (s_option)
+                   napms(s_option);
            }
        }
        AddCh(p);