mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
Fix crash on exit (addresses #607).
MutableVal's destructor now checks if the global scope still exists before trying to remove an identifier from it.
This commit is contained in:
parent
2d85ab9818
commit
a267c30fcd
2 changed files with 5 additions and 3 deletions
|
@ -638,14 +638,16 @@ MutableVal::~MutableVal()
|
|||
{
|
||||
for ( list<ID*>::iterator i = aliases.begin(); i != aliases.end(); ++i )
|
||||
{
|
||||
global_scope()->Remove((*i)->Name());
|
||||
if ( global_scope() )
|
||||
global_scope()->Remove((*i)->Name());
|
||||
(*i)->ClearVal(); // just to make sure.
|
||||
Unref((*i));
|
||||
}
|
||||
|
||||
if ( id )
|
||||
{
|
||||
global_scope()->Remove(id->Name());
|
||||
if ( global_scope() )
|
||||
global_scope()->Remove(id->Name());
|
||||
id->ClearVal(); // just to make sure.
|
||||
Unref(id);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue