Browse Source

webidl: fixed AV on field without type

mattias 3 năm trước cách đây
mục cha
commit
9a9a87a94b
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  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';