From 0387df3228a3b76fe302804ee50aea9d162be66e Mon Sep 17 00:00:00 2001 From: svenbarth <pascaldragon@googlemail.com> Date: Sun, 20 Aug 2017 19:08:57 +0000 Subject: [PATCH] * allow the buffer passed to Make() to be Nil git-svn-id: trunk@36981 - --- packages/rtl-objpas/src/inc/rtti.pp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/rtl-objpas/src/inc/rtti.pp b/packages/rtl-objpas/src/inc/rtti.pp index a6380d6d27..e73128d7f7 100644 --- a/packages/rtl-objpas/src/inc/rtti.pp +++ b/packages/rtl-objpas/src/inc/rtti.pp @@ -549,6 +549,8 @@ begin result.FData.FTypeInfo:=ATypeInfo; { resets the whole variant part; FValueData is already Nil } Result.FData.FAsUInt64 := 0; + if not Assigned(ABuffer) then + Exit; case ATypeInfo^.Kind of tkSString : result.FData.FValueData := TValueDataIntImpl.CreateCopy(ABuffer, Length(PShortString(ABuffer)^) + 1, ATypeInfo, True); tkWString,