소스 검색

Merge pull request #6045 from bojidar-bg/extends-on-placeholders

Fix #5891 by not expecting the script instance to be a GDInstance
Rémi Verschelde 9 년 전
부모
커밋
38cbf69e24
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 2
      modules/gdscript/gd_function.cpp

+ 1 - 2
modules/gdscript/gd_function.cpp

@@ -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()) {
 
-						GDInstance *ins = static_cast<GDInstance*>(obj_A->get_script_instance());
-						GDScript *cmp = ins->script.ptr();
+						GDScript *cmp = static_cast<GDScript*>(obj_A->get_script_instance()->get_script().ptr());
 						//bool found=false;
 						while(cmp) {