mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Nodes - Serialize node storage ourselves to ignore exceptions
This commit is contained in:
1 parent
a4667fdc03
commit
405d5b756c
5 files changed
+16
-5
No files matched your search
@@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using Artemis.Storage.Entities.Profile.Nodes;
|
||||
using Newtonsoft.Json;
|
||||
using Ninject;
|
||||
using Ninject.Parameters;
|
||||
using SkiaSharp;
|
||||
@@ -73,7 +74,14 @@ namespace Artemis.Core.Services
|
||||
{
|
||||
node.X = entity.X;
|
||||
node.Y = entity.Y;
|
||||
node.Storage = entity.Storage;
|
||||
try
|
||||
{
|
||||
node.Storage = CoreJson.DeserializeObject(entity.Storage, true);
|
||||
}
|
||||
catch
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
}
|
||||
|
||||
if (node is CustomViewModelNode customViewModelNode)
|
||||
|
||||
Reference in new issue
Block a user