mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-10 08:10:01 +02:00
* 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:
parent
82c31c7139
commit
86d2316a76
@ -597,11 +597,16 @@ implementation
|
|||||||
occurred then we will execute afterconstruction,
|
occurred then we will execute afterconstruction,
|
||||||
otherwise we won't be (the exception will jump over us) }
|
otherwise we won't be (the exception will jump over us) }
|
||||||
addstatement(newstatement,tocode);
|
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(
|
addstatement(newstatement,cifnode.create(
|
||||||
|
caddnode.create(andn,
|
||||||
|
caddnode.create(unequaln,
|
||||||
|
load_self_node,
|
||||||
|
cnilnode.create),
|
||||||
caddnode.create(unequaln,
|
caddnode.create(unequaln,
|
||||||
load_vmt_pointer_node,
|
load_vmt_pointer_node,
|
||||||
cnilnode.create),
|
cnilnode.create)),
|
||||||
ccallnode.create(nil,tprocsym(srsym),srsym.owner,load_self_node,[]),
|
ccallnode.create(nil,tprocsym(srsym),srsym.owner,load_self_node,[]),
|
||||||
nil));
|
nil));
|
||||||
tocode:=afterconstructionblock;
|
tocode:=afterconstructionblock;
|
||||||
|
Loading…
Reference in New Issue
Block a user