Invalid pointer operation.

This commit is contained in:
Henrique Gottardi Werlang 2023-08-03 14:21:59 -03:00 committed by Mattias Gaertner
parent 39a16c4fa8
commit d863ab6a24

View File

@ -18905,12 +18905,14 @@ var
Call: TJSCallExpression; Call: TJSCallExpression;
HasRTTIMembers: Boolean; HasRTTIMembers: Boolean;
begin begin
Call:=nil;
try
// module.$rtti.$Record("typename",{}); // module.$rtti.$Record("typename",{});
Call:=CreateRTTINewType(El,GetBIName(pbifnRTTINewRecord),false,FuncContext,ObjLit); Call:=CreateRTTINewType(El,GetBIName(pbifnRTTINewRecord),false,FuncContext,ObjLit);
if ObjLit=nil then if ObjLit=nil then
begin
Call.Free;
RaiseInconsistency(20190105141430,El); RaiseInconsistency(20190105141430,El);
end;
HasRTTIMembers:=CreateRTTIMembers(El,Src,FuncContext,MembersSrc,MembersFuncContext,Call,false); HasRTTIMembers:=CreateRTTIMembers(El,Src,FuncContext,MembersSrc,MembersFuncContext,Call,false);
if not HasRTTIMembers then if not HasRTTIMembers then
@ -18921,11 +18923,6 @@ begin
else else
Src.Statements.InsertNode(0).Node:=Call; Src.Statements.InsertNode(0).Node:=Call;
end; end;
Call:=nil;
finally
Call.Free;
end;
end; end;
function TPasToJSConverter.CreateDelayedInitMembersFunction(PosEl: TPasElement; function TPasToJSConverter.CreateDelayedInitMembersFunction(PosEl: TPasElement;