1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-29 17:39:09 +00:00

(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

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)