mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 16:29:24 +02:00
* allow the buffer passed to Make() to be Nil
git-svn-id: trunk@36981 -
This commit is contained in:
parent
bd74f9af64
commit
0387df3228
@ -549,6 +549,8 @@ begin
|
|||||||
result.FData.FTypeInfo:=ATypeInfo;
|
result.FData.FTypeInfo:=ATypeInfo;
|
||||||
{ resets the whole variant part; FValueData is already Nil }
|
{ resets the whole variant part; FValueData is already Nil }
|
||||||
Result.FData.FAsUInt64 := 0;
|
Result.FData.FAsUInt64 := 0;
|
||||||
|
if not Assigned(ABuffer) then
|
||||||
|
Exit;
|
||||||
case ATypeInfo^.Kind of
|
case ATypeInfo^.Kind of
|
||||||
tkSString : result.FData.FValueData := TValueDataIntImpl.CreateCopy(ABuffer, Length(PShortString(ABuffer)^) + 1, ATypeInfo, True);
|
tkSString : result.FData.FValueData := TValueDataIntImpl.CreateCopy(ABuffer, Length(PShortString(ABuffer)^) + 1, ATypeInfo, True);
|
||||||
tkWString,
|
tkWString,
|
||||||
|
Loading…
Reference in New Issue
Block a user