]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/widechar/lib_vid_attr.c
ncurses 6.0 - patch 20170909
[ncurses.git] / ncurses / widechar / lib_vid_attr.c
index 8487edf0d94635cc1dde6c85ef8b191d57097a71..9d5c708f370393baa2230cb241a7312a97db67f3 100644 (file)
@@ -36,7 +36,7 @@
 #define CUR SP_TERMTYPE
 #endif
 
-MODULE_ID("$Id: lib_vid_attr.c,v 1.24 2017/03/17 00:17:32 tom Exp $")
+MODULE_ID("$Id: lib_vid_attr.c,v 1.25 2017/06/24 13:22:27 tom Exp $")
 
 #define doPut(mode) \
        TPUTS_TRACE(#mode); \
@@ -86,6 +86,9 @@ NCURSES_SP_NAME(vid_puts) (NCURSES_SP_DCLx
 #define fix_pair0 FALSE
 #endif
 
+    if (!IsValidTIScreen(SP_PARM))
+       returnCode(ERR);
+
     newmode &= A_ATTRIBUTES;
     set_extended_pair(opts, color_pair);
     T((T_CALLED("vid_puts(%s,%d)"), _traceattr(newmode), color_pair));