]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/base/wresize.c
ncurses 5.9 - patch 20150418
[ncurses.git] / ncurses / base / wresize.c
index 9a6ea500727eeb57fe2223c168cf01960b12c958..bc6b5732ea41fe05aa46ed575c2db9af8d6b7389 100644 (file)
@@ -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 <curses.priv.h>
 
-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);