From b6232749186e891e9cd4b33b11083198f344ff23 Mon Sep 17 00:00:00 2001 From: Elias Ohm Date: Wed, 1 May 2019 12:09:24 +0200 Subject: [PATCH] another small adjustment by the way just to ensure the object on stack ist the same as the one serialized further in case the object does not implement locking on mutation (besides it's mor efficient to not fetch the same value twice) (cherry picked from commit cdd843a998bfaa5028369a3fd6d5368bdc6ee568) --- lib/base/serializer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/base/serializer.cpp b/lib/base/serializer.cpp index b6ba1d51e..7b2c84445 100644 --- a/lib/base/serializer.cpp +++ b/lib/base/serializer.cpp @@ -159,7 +159,7 @@ static Object::Ptr SerializeObject(const Object::Ptr& input, int attributeTypes, Value value = input->GetField(i); stack.Push(field.Name, value); - fields.emplace_back(field.Name, SerializeInternal(input->GetField(i), attributeTypes, stack)); + fields.emplace_back(field.Name, SerializeInternal(value, attributeTypes, stack)); stack.Pop(); }