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:
Jon Siwek 2011-09-12 13:16:48 -05:00
parent 2d85ab9818
commit a267c30fcd
2 changed files with 5 additions and 3 deletions

View file

@ -219,5 +219,5 @@ Scope* current_scope()
Scope* global_scope()
{
return scopes[0];
return scopes.length() == 0 ? 0 : scopes[0];
}