Fix potential error when loading Guid from Json

This commit is contained in:
Wojtek Figat
2023-10-04 22:38:06 +02:00
parent d2eefd4345
commit d1c0900ad7

View File

@@ -256,7 +256,7 @@ BoundingBox JsonTools::GetBoundingBox(const Value& value)
Guid JsonTools::GetGuid(const Value& value) Guid JsonTools::GetGuid(const Value& value)
{ {
if (value.IsNull()) if (!value.IsString())
return Guid::Empty; return Guid::Empty;
CHECK_RETURN(value.GetStringLength() == 32, Guid::Empty); CHECK_RETURN(value.GetStringLength() == 32, Guid::Empty);