Reordered NotifyDelete switch statement for more clarity

This commit is contained in:
smallmodel 2023-10-26 20:17:42 +02:00
parent f01a0a17c1
commit 0f7691c722
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -1807,10 +1807,6 @@ void ScriptVM::NotifyDelete(void)
}
switch (state) {
case STATE_DESTROYED:
ScriptError("Attempting to delete a dead thread.");
break;
case STATE_RUNNING:
case STATE_SUSPENDED:
case STATE_WAITING:
@ -1832,6 +1828,16 @@ void ScriptVM::NotifyDelete(void)
delete this;
break;
case STATE_DESTROYED:
ScriptError("Attempting to delete a dead thread.");
state = STATE_DESTROYED;
if (m_ScriptClass) {
m_ScriptClass->RemoveThread(this);
}
break;
}
}