diff options
author | George Marques <george@gmarqu.es> | 2023-01-28 20:33:01 -0300 |
---|---|---|
committer | George Marques <george@gmarqu.es> | 2023-01-28 20:33:01 -0300 |
commit | aee7b7363b206678816272f1bd43b192cdc7d12a (patch) | |
tree | e00662979f3649f4583b869bac5b204b16ca3114 /modules/gdscript/gdscript.cpp | |
parent | 218bef90af2091afde3b1be816c87286c194a2a8 (diff) | |
download | redot-engine-aee7b7363b206678816272f1bd43b192cdc7d12a.tar.gz |
GDScript: Avoid calling non-static methods on native classes
Diffstat (limited to 'modules/gdscript/gdscript.cpp')
-rw-r--r-- | modules/gdscript/gdscript.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index 4fc3929bbd..d9b8a540c0 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -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); } |