Avoid warning about harmless unfulfilled yields
This commit is contained in:
parent
d84954a281
commit
f76a13dea0
@ -1044,8 +1044,10 @@ GDScript::~GDScript() {
|
|||||||
MutexLock lock(GDScriptLanguage::get_singleton()->lock);
|
MutexLock lock(GDScriptLanguage::get_singleton()->lock);
|
||||||
|
|
||||||
while (SelfList<GDScriptFunctionState> *E = pending_func_states.first()) {
|
while (SelfList<GDScriptFunctionState> *E = pending_func_states.first()) {
|
||||||
E->self()->_clear_stack();
|
// Order matters since clearing the stack may already cause
|
||||||
|
// the GDSCriptFunctionState to be destroyed and thus removed from the list.
|
||||||
pending_func_states.remove(E);
|
pending_func_states.remove(E);
|
||||||
|
E->self()->_clear_stack();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1449,8 +1451,10 @@ GDScriptInstance::~GDScriptInstance() {
|
|||||||
MutexLock lock(GDScriptLanguage::get_singleton()->lock);
|
MutexLock lock(GDScriptLanguage::get_singleton()->lock);
|
||||||
|
|
||||||
while (SelfList<GDScriptFunctionState> *E = pending_func_states.first()) {
|
while (SelfList<GDScriptFunctionState> *E = pending_func_states.first()) {
|
||||||
E->self()->_clear_stack();
|
// Order matters since clearing the stack may already cause
|
||||||
|
// the GDSCriptFunctionState to be destroyed and thus removed from the list.
|
||||||
pending_func_states.remove(E);
|
pending_func_states.remove(E);
|
||||||
|
E->self()->_clear_stack();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (script.is_valid() && owner) {
|
if (script.is_valid() && owner) {
|
||||||
|
Loading…
Reference in New Issue
Block a user