瀏覽代碼

* skip nil values in current_module.deflist in TLLVMMachineCodePlaygroundAssembler.WriteImports

git-svn-id: trunk@48985 -
nickysn 4 年之前
父節點
當前提交
d090af4abe
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      compiler/wasm32/agllvmmc.pas

+ 1 - 1
compiler/wasm32/agllvmmc.pas

@@ -75,7 +75,7 @@ implementation
       cur_unit: tused_unit;
     begin
       for i:=0 to current_module.deflist.Count-1 do
-        if tdef(current_module.deflist[i]).typ = procdef then
+        if assigned(current_module.deflist[i]) and (tdef(current_module.deflist[i]).typ=procdef) then
           begin
             proc := tprocdef(current_module.deflist[i]);
             if (po_external in proc.procoptions) and assigned(proc.import_dll) then