Переглянути джерело

* Do not access fields of potentially unassigned resultdef. p1.resultdef is not assigned at this point when dotypecheck=false. Mantis #20765.

git-svn-id: trunk@19694 -
sergei 13 роки тому
батько
коміт
816953990d
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      compiler/pexpr.pas

+ 1 - 1
compiler/pexpr.pas

@@ -3094,7 +3094,7 @@ implementation
            _ASSIGNMENT :
              begin
                 consume(_ASSIGNMENT);
-                if (p1.resultdef.typ=procvardef) then
+                if assigned(p1.resultdef) and (p1.resultdef.typ=procvardef) then
                   getprocvardef:=tprocvardef(p1.resultdef);
                 p2:=sub_expr(opcompare,true,false);
                 if assigned(getprocvardef) then