Skip to content

Commit

Permalink
fix NRE in Equals override
Browse files Browse the repository at this point in the history
  • Loading branch information
rgwood committed Dec 27, 2020
1 parent 7beddc7 commit 6cbe291
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ReiTunes.Core/Models/LibraryItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
using System.Linq;

namespace ReiTunes.Core {
// TODO: this should probably be a
public record Bookmark(Guid ID, TimeSpan Position, char? Emoji, string Comment = null) {
public virtual bool Equals(Bookmark other) => ID == other.ID;
public virtual bool Equals(Bookmark other) => ID == other?.ID;
public override int GetHashCode() => ID.GetHashCode();
}

Expand Down

0 comments on commit 6cbe291

Please sign in to comment.