System types like the string doesn't have a module information. Now the function is checking if is loaded to not raise any error.

This commit is contained in:
Henrique Gottardi Werlang 2025-05-27 20:37:09 -03:00
parent 8d87707e2d
commit a9f23105b4

View File

@ -2473,7 +2473,10 @@ end;
function TRttiType.GetDeclaringUnitName: String;
begin
Result := Handle.Module.Name;
if Assigned(Handle.Module) then
Result := Handle.Module.Name
else
Result := 'System';
end;
function TRttiType.GetQualifiedName: String;