From 91296c2a250b1aeb0976f252eba5ffdce93c8590 Mon Sep 17 00:00:00 2001 From: Elias Ohm Date: Sun, 28 Apr 2019 22:13:19 +0200 Subject: [PATCH] Lock Objects during serialization old behaviour was to only lock arrays, dictionaries and namespaces but not other objects --- lib/base/serializer.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/base/serializer.cpp b/lib/base/serializer.cpp index 416a8607c..1b692d599 100644 --- a/lib/base/serializer.cpp +++ b/lib/base/serializer.cpp @@ -129,6 +129,8 @@ static Object::Ptr SerializeObject(const Object::Ptr& input, int attributeTypes, DictionaryData fields; fields.reserve(type->GetFieldCount() + 1); + ObjectLock olock(input); + for (int i = 0; i < type->GetFieldCount(); i++) { Field field = type->GetFieldInfo(i);