From 10040ef9d0a35c4974e8e05987165723b7baf695 Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Sat, 31 May 2008 22:41:09 +0000 Subject: [PATCH] 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 --- ChangeLog | 2 ++ src/nano.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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); -- 2.39.5