浏览代码

* don't crash in case a symbol is not found in type/var/const section

git-svn-id: trunk@23264 -
florian 12 年之前
父节点
当前提交
288820715d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      compiler/pexpr.pas

+ 1 - 1
compiler/pexpr.pas

@@ -2210,7 +2210,7 @@ implementation
                  begin
                  begin
                    { if a generic is parsed and when we are inside an with block,
                    { if a generic is parsed and when we are inside an with block,
                      a symbol might not be defined }
                      a symbol might not be defined }
-                   if (df_generic in current_procinfo.procdef.defoptions) and
+                   if assigned(current_procinfo) and (df_generic in current_procinfo.procdef.defoptions) and
                       findwithsymtable then
                       findwithsymtable then
                      begin
                      begin
                        { create dummy symbol, it will be freed later on }
                        { create dummy symbol, it will be freed later on }