Fixed exceptions when attempting to set the value of a serializable rect property by parsing a string

This commit is contained in:
Joonas Rikkonen
2017-12-02 16:25:21 +02:00
parent c66191ca94
commit 063881701c

View File

@@ -255,7 +255,7 @@ namespace Barotrauma
propertyInfo.SetValue(obj, XMLExtensions.ParseColor((string)value));
return true;
case "rectangle":
propertyInfo.SetValue(obj, XMLExtensions.ParseColor((string)value));
propertyInfo.SetValue(obj, XMLExtensions.ParseRect((string)value, false));
return true;
default:
DebugConsole.ThrowError("Failed to set the value of the property \"" + Name + "\" of \"" + obj.ToString() + "\" to " + value.ToString());