Ver Fonte

* 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 há 13 anos atrás
pai
commit
816953990d
1 ficheiros alterados com 1 adições e 1 exclusões
  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