X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=ncurses%2Ftinfo%2Flib_options.c;h=c8e75a3599f5b14f1d3ba27df4609152b0452fe7;hb=5e1e572b71ae31a6071daa24e2460a68a6f1003c;hp=b736d5fcab40c065840705d1705bec03863e9da3;hpb=a924c24b2535cccdc0f5f991cd8ddcadcfa1f0d2;p=ncurses.git diff --git a/ncurses/tinfo/lib_options.c b/ncurses/tinfo/lib_options.c index b736d5fc..c8e75a35 100644 --- a/ncurses/tinfo/lib_options.c +++ b/ncurses/tinfo/lib_options.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2013,2014 Free Software Foundation, Inc. * + * Copyright (c) 1998-2014,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -46,7 +46,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_options.c,v 1.78 2014/09/27 21:55:24 tom Exp $") +MODULE_ID("$Id: lib_options.c,v 1.79 2017/04/15 22:24:38 tom Exp $") NCURSES_EXPORT(int) idlok(WINDOW *win, bool flag) @@ -87,7 +87,7 @@ NCURSES_SP_NAME(halfdelay) (NCURSES_SP_DCLx int t) { T((T_CALLED("halfdelay(%p,%d)"), (void *) SP_PARM, t)); - if (t < 1 || t > 255 || !IsValidTIScreen(SP_PARM)) + if (t < 1 || t > 255 || !SP_PARM || !IsValidTIScreen(SP_PARM)) returnCode(ERR); NCURSES_SP_NAME(cbreak) (NCURSES_SP_ARG); @@ -241,7 +241,7 @@ NCURSES_EXPORT(int) NCURSES_SP_NAME(typeahead) (NCURSES_SP_DCLx int fd) { T((T_CALLED("typeahead(%p, %d)"), (void *) SP_PARM, fd)); - if (IsValidTIScreen(SP_PARM)) { + if (SP_PARM && IsValidTIScreen(SP_PARM)) { SP_PARM->_checkfd = fd; returnCode(OK); } else {