mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
null pointer dereference at GDScriptFunction::call fix
This commit is contained in:
parent
358e209fa0
commit
75d4511cb5
@ -1058,7 +1058,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
|
|||||||
err_text = "Got a freed object as a result of the call.";
|
err_text = "Got a freed object as a result of the call.";
|
||||||
OPCODE_BREAK;
|
OPCODE_BREAK;
|
||||||
}
|
}
|
||||||
if (obj->is_class_ptr(GDScriptFunctionState::get_class_ptr_static())) {
|
if (obj && obj->is_class_ptr(GDScriptFunctionState::get_class_ptr_static())) {
|
||||||
err_text = R"(Trying to call an async function without "await".)";
|
err_text = R"(Trying to call an async function without "await".)";
|
||||||
OPCODE_BREAK;
|
OPCODE_BREAK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user