mirror of https://github.com/OpenTTD/OpenTTD.git
(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:
parent
95f7c05199
commit
1df029de1d
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue