diff --git a/FinModelUtility/UniversalAssetTool/UniversalAssetTool.Ui/src/winforms/common/BetterTreeView.cs b/FinModelUtility/UniversalAssetTool/UniversalAssetTool.Ui/src/winforms/common/BetterTreeView.cs index db8112351..d499ef26e 100644 --- a/FinModelUtility/UniversalAssetTool/UniversalAssetTool.Ui/src/winforms/common/BetterTreeView.cs +++ b/FinModelUtility/UniversalAssetTool/UniversalAssetTool.Ui/src/winforms/common/BetterTreeView.cs @@ -25,7 +25,7 @@ public static void ForEach(TreeNodeCollection collection, public static T GetBetterFrom(TreeNode node) where T : IBetterTreeNode where S : class - => (T) node.Tag; + => (T) node.Tag!; } public interface IBetterTreeView where T : class { diff --git a/FinModelUtility/UniversalAssetTool/UniversalAssetTool.Ui/src/winforms/right_panel/textures/TexturePanel.cs b/FinModelUtility/UniversalAssetTool/UniversalAssetTool.Ui/src/winforms/right_panel/textures/TexturePanel.cs index f9ad7ab98..0a2a05a57 100644 --- a/FinModelUtility/UniversalAssetTool/UniversalAssetTool.Ui/src/winforms/right_panel/textures/TexturePanel.cs +++ b/FinModelUtility/UniversalAssetTool/UniversalAssetTool.Ui/src/winforms/right_panel/textures/TexturePanel.cs @@ -3,6 +3,7 @@ using System.Windows.Forms; using fin.model; +using fin.util.asserts; using uni.ui.winforms.common; @@ -32,5 +33,5 @@ public IReadOnlyTexture? Texture { } private void CopyImageToClipboard_() - => Clipboard.SetImage(this.pictureBox_.Image); + => Clipboard.SetImage(this.pictureBox_.Image.AssertNonnull()); } \ No newline at end of file