Fix #5891 by not expecting the script instance to be a GDInstance
It could be a placeholder instance as well
This commit is contained in:
parent
6ed5d48d0c
commit
76ea995228
@ -372,8 +372,7 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
|
|||||||
|
|
||||||
if (obj_A->get_script_instance() && obj_A->get_script_instance()->get_language()==GDScriptLanguage::get_singleton()) {
|
if (obj_A->get_script_instance() && obj_A->get_script_instance()->get_language()==GDScriptLanguage::get_singleton()) {
|
||||||
|
|
||||||
GDInstance *ins = static_cast<GDInstance*>(obj_A->get_script_instance());
|
GDScript *cmp = static_cast<GDScript*>(obj_A->get_script_instance()->get_script().ptr());
|
||||||
GDScript *cmp = ins->script.ptr();
|
|
||||||
//bool found=false;
|
//bool found=false;
|
||||||
while(cmp) {
|
while(cmp) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user