add various fixes to avoid a hang and several potential assertion

failures when building with DEBUG defined


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2544 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
David Lawrence Ramsey
2005-05-26 05:17:13 +00:00
parent e4acb69611
commit 31b159c1b3
6 changed files with 48 additions and 39 deletions

View File

@@ -713,6 +713,7 @@ openfilestruct *make_new_opennode(void)
openfilestruct *newnode =
(openfilestruct *)nmalloc(sizeof(openfilestruct));
newnode->filename = NULL;
return newnode;
}
@@ -769,7 +770,7 @@ void free_openfilestruct(openfilestruct *src)
* updated. */
void add_open_file(bool update)
{
if (open_files == NULL && update)
if (update && open_files == NULL)
return;
/* If there are no entries in open_files, make the first one. */