You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user