Avoid warning about harmless unfulfilled yields
This commit is contained in:
parent
939ed5dd5b
commit
51844febee
1 changed files with 6 additions and 2 deletions
|
@ -975,8 +975,10 @@ GDScript::~GDScript() {
|
||||||
GDScriptLanguage::get_singleton()->lock->lock();
|
GDScriptLanguage::get_singleton()->lock->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 (GDScriptLanguage::get_singleton()->lock) {
|
if (GDScriptLanguage::get_singleton()->lock) {
|
||||||
GDScriptLanguage::get_singleton()->lock->unlock();
|
GDScriptLanguage::get_singleton()->lock->unlock();
|
||||||
|
@ -1404,8 +1406,10 @@ GDScriptInstance::~GDScriptInstance() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
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 a new issue