瀏覽代碼

* ensure that a valid reference to the raw data is provided as long as the typeinfo is set

git-svn-id: trunk@39879 -
svenbarth 7 年之前
父節點
當前提交
608da3d255
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/rtl-objpas/src/inc/rtti.pp

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

@@ -1855,7 +1855,7 @@ end;
 
 function TValue.GetReferenceToRawData: Pointer;
 begin
-  if IsEmpty then
+  if not Assigned(FData.FTypeInfo) then
     Result := Nil
   else if Assigned(FData.FValueData) then
     Result := FData.FValueData.GetReferenceToRawData