mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Fix unsafe uses of Callable.is_null()
`Callable.is_null()` is not equivalent to `!Callable.is_valid()` and doesn't guarantee the call is valid.
This commit is contained in:
parent
6118592c6d
commit
31e7ee63f2
19 changed files with 40 additions and 40 deletions
|
@ -2106,7 +2106,7 @@ void RendererCanvasCull::update_visibility_notifiers() {
|
|||
if (visibility_notifier->just_visible) {
|
||||
visibility_notifier->just_visible = false;
|
||||
|
||||
if (!visibility_notifier->enter_callable.is_null()) {
|
||||
if (visibility_notifier->enter_callable.is_valid()) {
|
||||
if (RSG::threaded) {
|
||||
visibility_notifier->enter_callable.call_deferred();
|
||||
} else {
|
||||
|
@ -2117,7 +2117,7 @@ void RendererCanvasCull::update_visibility_notifiers() {
|
|||
if (visibility_notifier->visible_in_frame != RSG::rasterizer->get_frame_number()) {
|
||||
visibility_notifier_list.remove(E);
|
||||
|
||||
if (!visibility_notifier->exit_callable.is_null()) {
|
||||
if (visibility_notifier->exit_callable.is_valid()) {
|
||||
if (RSG::threaded) {
|
||||
visibility_notifier->exit_callable.call_deferred();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue