* check for self<>nil again before calling afterconstruction, fixes

tclass5.pp, tw1283.pp and tw10790.pp after r15583

git-svn-id: trunk@15585 -
This commit is contained in:
Jonas Maebe 2010-07-16 07:12:31 +00:00
parent 82c31c7139
commit 86d2316a76

View File

@ -597,11 +597,16 @@ implementation
occurred then we will execute afterconstruction,
otherwise we won't be (the exception will jump over us) }
addstatement(newstatement,tocode);
{ if vmt<>nil then afterconstruction }
{ Self can be nil when fail is called }
{ if self<>nil and vmt<>nil then afterconstruction }
addstatement(newstatement,cifnode.create(
caddnode.create(unequaln,
load_vmt_pointer_node,
caddnode.create(andn,
caddnode.create(unequaln,
load_self_node,
cnilnode.create),
caddnode.create(unequaln,
load_vmt_pointer_node,
cnilnode.create)),
ccallnode.create(nil,tprocsym(srsym),srsym.owner,load_self_node,[]),
nil));
tocode:=afterconstructionblock;