Przeglądaj źródła

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

git-svn-id: trunk@23264 -
florian 12 lat temu
rodzic
commit
288820715d
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      compiler/pexpr.pas

+ 1 - 1
compiler/pexpr.pas

@@ -2210,7 +2210,7 @@ implementation
                  begin
                    { if a generic is parsed and when we are inside an with block,
                      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
                      begin
                        { create dummy symbol, it will be freed later on }