You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
GDScript: Avoid calling non-static methods on native classes
This commit is contained in:
@@ -98,7 +98,7 @@ Variant GDScriptNativeClass::callp(const StringName &p_method, const Variant **p
|
||||
return Object::callp(p_method, p_args, p_argcount, r_error);
|
||||
}
|
||||
MethodBind *method = ClassDB::get_method(name, p_method);
|
||||
if (method) {
|
||||
if (method && method->is_static()) {
|
||||
// Native static method.
|
||||
return method->call(nullptr, p_args, p_argcount, r_error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user