(svn r16534) -Fix [Squirrel] [FS#2942]: fix crash that occured when an AI was halted while one or more generators were still in a 'running' state

This commit is contained in:
yexo 2009-06-07 20:20:22 +00:00
parent 95f7c05199
commit 1df029de1d
1 changed files with 5 additions and 1 deletions

View File

@ -189,8 +189,12 @@ SQSharedState::~SQSharedState()
SQCollectable *t = _gc_chain;
SQCollectable *nx = NULL;
while(t) {
t->UnMark();
t->_uiRef++;
t = t->_next;
}
t = _gc_chain;
while(t) {
t->UnMark();
t->Finalize();
nx = t->_next;
if(--t->_uiRef == 0)