]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/lib_setup.c
ncurses 5.9 - patch 20130126
[ncurses.git] / ncurses / tinfo / lib_setup.c
index 9467b7df6b3097a68003bb8a00214d7647de7536..6e738e0f5a7dafaeb013557fb74e1839c5873ccf 100644 (file)
@@ -48,7 +48,7 @@
 #include <locale.h>
 #endif
 
-MODULE_ID("$Id: lib_setup.c,v 1.154 2012/12/08 22:01:26 tom Exp $")
+MODULE_ID("$Id: lib_setup.c,v 1.155 2012/12/15 19:04:54 tom Exp $")
 
 /****************************************************************************
  *
@@ -438,7 +438,7 @@ _nc_update_screensize(SCREEN *sp)
      * We're doing it this way because those functions belong to the upper
      * ncurses library, while this resides in the lower terminfo library.
      */
-    if (sp->_resize != 0) {
+    if (sp != 0 && sp->_resize != 0) {
        if ((new_lines != old_lines) || (new_cols != old_cols)) {
            sp->_resize(NCURSES_SP_ARGx new_lines, new_cols);
        } else if (sp->_sig_winch && (sp->_ungetch != 0)) {