Skip to content

Commit

Permalink
Fixed some NPEs.
Browse files Browse the repository at this point in the history
  • Loading branch information
MeltyPlayer committed Dec 18, 2024
1 parent ac9ed84 commit dbcdc67
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static void ForEach<T, S>(TreeNodeCollection collection,
public static T GetBetterFrom<T, S>(TreeNode node)
where T : IBetterTreeNode<S>
where S : class
=> (T) node.Tag;
=> (T) node.Tag!;
}

public interface IBetterTreeView<T> where T : class {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Windows.Forms;

using fin.model;
using fin.util.asserts;

using uni.ui.winforms.common;

Expand Down Expand Up @@ -32,5 +33,5 @@ public IReadOnlyTexture? Texture {
}

private void CopyImageToClipboard_()
=> Clipboard.SetImage(this.pictureBox_.Image);
=> Clipboard.SetImage(this.pictureBox_.Image.AssertNonnull());
}

0 comments on commit dbcdc67

Please sign in to comment.