Skip to content

Commit

Permalink
add exception handling on OnDeserialized's PropertiesChanged call
Browse files Browse the repository at this point in the history
  • Loading branch information
Aytackydln committed Oct 26, 2024
1 parent a99727a commit b966c96
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Project-Aurora/Project-Aurora/Settings/Layers/LayerHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,16 @@ protected virtual UserControl CreateControl()
[UsedImplicitly]
private void OnDeserialized(StreamingContext context)
{
PropertiesChanged(this, new PropertyChangedEventArgs(string.Empty));
try
{
PropertiesChanged(this, new PropertyChangedEventArgs(string.Empty));
}
catch (Exception ex)
{
Global.logger.Error(ex, "Error deserializing layer");
}
}

protected virtual void PropertiesChanged(object? sender, PropertyChangedEventArgs args)
{
Invalidated = true;
Expand Down

0 comments on commit b966c96

Please sign in to comment.