Browse Source

* generate_specialization_phase2() might also return an errordef, so check for that instead of simply using the symbol; fixes access violations of tgenconstraint{38,39,40}.pp

git-svn-id: trunk@34460 -
svenbarth 9 years ago
parent
commit
7dd0130ac2
1 changed files with 10 additions and 2 deletions
  1. 10 2
      compiler/pexpr.pas

+ 10 - 2
compiler/pexpr.pas

@@ -2840,8 +2840,16 @@ implementation
                                hdef:=generate_specialization_phase2(spezcontext,tstoreddef(hdef),false,'');
                                spezcontext.free;
                                spezcontext:=nil;
-                               srsym:=hdef.typesym;
-                               srsymtable:=srsym.owner;
+                               if hdef<>generrordef then
+                                 begin
+                                   srsym:=hdef.typesym;
+                                   srsymtable:=srsym.owner;
+                                 end
+                               else
+                                 begin
+                                   srsym:=generrorsym;
+                                   srsymtable:=nil;
+                                 end;
                              end
                            else
                              if hdef.typ=procdef then