Reordered NotifyDelete switch statement for more clarity

This commit is contained in:
smallmodel committed 2023-10-26 20:17:42 +02:00
1 parent f01a0a17c1
commit 0f7691c722
1 file changed
+10 -4
+10 -4
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;
}
}