Lock Objects during serialization

old behaviour was to only lock arrays, dictionaries and namespaces but not other objects

(cherry picked from commit 91296c2a25)
This commit is contained in:
Elias Ohm 2019-04-28 22:13:19 +02:00 committed by Michael Friedrich
parent ae3590023b
commit 68418eb6bc
1 changed files with 2 additions and 0 deletions

View File

@ -146,6 +146,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);