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:
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user