소스 검색

fixes crash for OPCODE_CAST_TO_NATIVE opcode in gdscript disassemlber

Jordan Schidlowsky 4 년 전
부모
커밋
afa15c5f15
1개의 변경된 파일1개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 4
      modules/gdscript/gdscript_disassembler.cpp

+ 1 - 4
modules/gdscript/gdscript_disassembler.cpp

@@ -360,15 +360,12 @@ void GDScriptFunction::disassemble(const Vector<String> &p_code_lines) const {
 				incr += 4;
 			} break;
 			case OPCODE_CAST_TO_NATIVE: {
-				Variant class_name = _constants_ptr[_code_ptr[ip + 1]];
-				GDScriptNativeClass *nc = Object::cast_to<GDScriptNativeClass>(class_name.operator Object *());
-
 				text += "cast native ";
 				text += DADDR(2);
 				text += " = ";
 				text += DADDR(1);
 				text += " as ";
-				text += nc->get_name();
+				text += DADDR(3);
 
 				incr += 4;
 			} break;