X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Fwresize.c;h=bc6b5732ea41fe05aa46ed575c2db9af8d6b7389;hp=9a6ea500727eeb57fe2223c168cf01960b12c958;hb=e33150410925e7858dacebb585a9bd90db683d86;hpb=6b43eaddcd1d9397fb3d51ce4c34f02472e93417 diff --git a/ncurses/base/wresize.c b/ncurses/base/wresize.c index 9a6ea500..bc6b5732 100644 --- a/ncurses/base/wresize.c +++ b/ncurses/base/wresize.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2010,2011 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 * @@ -33,7 +33,7 @@ #include -MODULE_ID("$Id: wresize.c,v 1.34 2010/06/05 22:36:26 tom Exp $") +MODULE_ID("$Id: wresize.c,v 1.35 2011/05/21 18:55:07 tom Exp $") static int cleanup_lines(struct ldat *data, int length) @@ -175,9 +175,10 @@ wresize(WINDOW *win, int ToLines, int ToCols) for (col = 0; col <= ToCols; ++col) s[col] = win->_nc_bkgd; } - } else { - assert(pline != 0); + } else if (pline != 0 && pline[win->_pary + row].text != 0) { s = &pline[win->_pary + row].text[win->_parx]; + } else { + s = 0; } if_USE_SCROLL_HINTS(new_lines[row].oldindex = row);