Browse Source

* GetDataSize is 0 for empty TValue

Michaël Van Canneyt 7 months ago
parent
commit
2070a45217
1 changed files with 2 additions and 0 deletions
  1. 2 0
      packages/rtl-objpas/src/inc/rtti.pp

+ 2 - 0
packages/rtl-objpas/src/inc/rtti.pp

@@ -2860,6 +2860,8 @@ begin
     Result:=FData.FValueData.GetDataSize;
     exit;
   end;
+  if IsEmpty then 
+    exit;
   case Kind of
     tkEnumeration,
     tkBool,