From: Chris Allegretta Date: Sat, 31 May 2008 22:41:09 +0000 (+0000) Subject: Segfault fix for too small window size by Andreas Amann X-Git-Tag: v2.0.8~6 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=10040ef9d0a35c4974e8e05987165723b7baf695;p=nano.git Segfault fix for too small window size by Andreas Amann git-svn-id: svn://svn.savannah.gnu.org/nano/branches/nano_2_0_branch/nano@4258 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 1f98a671..f6d9c570 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ CVS code - +- nano.c: + - Fix for segfault on resize by Andreas Amann GNU nano 2.0.7 - 2007.12.20 - General: diff --git a/src/nano.c b/src/nano.c index 2c193f00..e43dfe1b 100644 --- a/src/nano.c +++ b/src/nano.c @@ -610,7 +610,7 @@ void die(const char *msg, ...) va_end(ap); /* Save the current file buffer if it's been modified. */ - if (openfile->modified) { + if (openfile && openfile->modified) { /* If we've partitioned the filestruct, unpartition it now. */ if (filepart != NULL) unpartition_filestruct(&filepart);