فهرست منبع

Merge pull request #14459 from vnen/gdscript-object-export

Make GDScript parser raise error when exporting Object
Rémi Verschelde 7 سال پیش
والد
کامیت
bdf0c93a9f
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      modules/gdscript/gdscript_parser.cpp

+ 4 - 0
modules/gdscript/gdscript_parser.cpp

@@ -3389,6 +3389,10 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
 							_set_error("Can't export null type.");
 							return;
 						}
+						if (type == Variant::OBJECT) {
+							_set_error("Can't export raw object type.");
+							return;
+						}
 						current_export.type = type;
 						current_export.usage |= PROPERTY_USAGE_SCRIPT_VARIABLE;
 						tokenizer->advance();