X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_refresh.c;h=5d8eab542b8135e9db2eec7a5209ac12ef0dd98d;hp=e5908a39e9210db58559aa838da726085844deae;hb=55ccd2b959766810cf7db8d1c4462f338ce0afc8;hpb=46722468f47c2b77b3987729b4bcf2321cccfd01 diff --git a/ncurses/base/lib_refresh.c b/ncurses/base/lib_refresh.c index e5908a39..5d8eab54 100644 --- a/ncurses/base/lib_refresh.c +++ b/ncurses/base/lib_refresh.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2001,2002 Free Software Foundation, Inc. * + * Copyright (c) 1998-2002,2005 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 * @@ -29,6 +29,7 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * + * and: Thomas E. Dickey 1996-on * ****************************************************************************/ /* @@ -40,7 +41,7 @@ #include -MODULE_ID("$Id: lib_refresh.c,v 1.32 2002/05/26 00:17:04 tom Exp $") +MODULE_ID("$Id: lib_refresh.c,v 1.33 2005/04/09 15:20:58 tom Exp $") NCURSES_EXPORT(int) wrefresh(WINDOW *win) @@ -49,7 +50,9 @@ wrefresh(WINDOW *win) T((T_CALLED("wrefresh(%p)"), win)); - if (win == curscr) { + if (win == 0) { + code = ERR; + } else if (win == curscr) { curscr->_clear = TRUE; code = doupdate(); } else if ((code = wnoutrefresh(win)) == OK) {