Browse Source

webidl: fixed AV on field without type

mattias 3 years ago
parent
commit
9a9a87a94b
1 changed files with 5 additions and 0 deletions
  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';