Skip to content

Commit 84b5084

Browse files
committed
Restore XE2 compatibility
1 parent 7e8255d commit 84b5084

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Source/WrapDelphi.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,8 +1162,8 @@ function ValidateClassRef(PyValue: PPyObject; TypeInfo: PTypeInfo;
11621162
if Assigned(LPythonType) and LPythonType.PyObjectClass.InheritsFrom(TPyDelphiObject) then
11631163
begin
11641164
ClassRef := TPyDelphiObjectClass(LPythonType.PyObjectClass).DelphiObjectClass;
1165-
TypeInfo := TypeInfo^.TypeData^.InstanceType^;
1166-
if Assigned(TypeInfo) and (ClassRef.InheritsFrom(TypeInfo^.TypeData^.ClassType)) then
1165+
TypeInfo := GetTypeData(TypeInfo)^.InstanceType^;
1166+
if Assigned(TypeInfo) and (ClassRef.InheritsFrom(GetTypeData(TypeInfo)^.ClassType)) then
11671167
Result := True
11681168
else
11691169
ErrMsg := rs_IncompatibleClasses;

0 commit comments

Comments
 (0)