2
0
Fork 0

Merge pull request #51593 from KoBeWi/if

Prevent crash when awaiting in a getter/setter
4.0
George Marques 2021-09-10 10:36:25 +07:00 committed by GitHub
commit 11e457e594
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

@ -2385,7 +2385,9 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_await(ExpressionNode *p_pr
}
await->to_await = element;
current_function->is_coroutine = true;
if (current_function) { // Might be null in a getter or setter.
current_function->is_coroutine = true;
}
return await;
}