Fix deserialization errors preventing context menus to open
Not a proper fix but Mono runtime seems to silently ignore this error when clipboard contains garbage data.
This commit is contained in:
@@ -616,7 +616,14 @@ namespace FlaxEditor.CustomEditors
|
||||
else
|
||||
{
|
||||
// Default
|
||||
obj = JsonConvert.DeserializeObject(text, TypeUtils.GetType(Values.Type), JsonSerializer.Settings);
|
||||
try
|
||||
{
|
||||
obj = JsonConvert.DeserializeObject(text, TypeUtils.GetType(Values.Type), JsonSerializer.Settings);
|
||||
}
|
||||
catch
|
||||
{
|
||||
obj = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (obj == null || Values.Type.IsInstanceOfType(obj))
|
||||
|
||||
Reference in New Issue
Block a user