Browse Source

* correctly handle IsEmpty if Nil had been passed to Make

git-svn-id: trunk@36984 -
svenbarth 8 years ago
parent
commit
ae6352611f
1 changed files with 3 additions and 1 deletions
  1. 3 1
      packages/rtl-objpas/src/inc/rtti.pp

+ 3 - 1
packages/rtl-objpas/src/inc/rtti.pp

@@ -703,7 +703,9 @@ end;
 
 
 function TValue.GetIsEmpty: boolean;
 function TValue.GetIsEmpty: boolean;
 begin
 begin
-  result := (FData.FTypeInfo=nil);
+  result := (FData.FTypeInfo=nil) or
+            ((Kind in [tkSString, tkObject, tkRecord, tkArray]) and not Assigned(FData.FValueData)) or
+            ((Kind in [tkClass, tkClassRef, tkInterfaceRaw]) and not Assigned(FData.FAsPointer));
 end;
 end;
 
 
 function TValue.IsArray: boolean;
 function TValue.IsArray: boolean;