mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +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
|
@ -1921,7 +1921,7 @@ void EngineDebugger::send_message(const String &p_msg, const Array &p_data) {
|
|||
|
||||
Error EngineDebugger::call_capture(void *p_user, const String &p_cmd, const Array &p_data, bool &r_captured) {
|
||||
Callable &capture = *(Callable *)p_user;
|
||||
if (capture.is_null()) {
|
||||
if (!capture.is_valid()) {
|
||||
return FAILED;
|
||||
}
|
||||
Variant cmd = p_cmd, data = p_data;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue