浏览代码

webidl: fixed AV on field without type

mattias 3 年之前
父节点
当前提交
9a9a87a94b
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      packages/webidl/src/webidltopas.pp

+ 5 - 0
packages/webidl/src/webidltopas.pp

@@ -726,6 +726,11 @@ Var
 begin
   Result:=True;
   N:=GetName(aAttr);
+  if aAttr.AttributeType=nil then
+    begin
+    AddLn('skipping field without type: "'+N+'"');
+    exit;
+    end;
   TN:=GetTypeName(aAttr.AttributeType);
   if TN='record' then
     TN:='TJSObject';