diff --git a/Commandline/TUI/Pixel.cs b/Commandline/TUI/Pixel.cs index 71e0d15..3640bad 100644 --- a/Commandline/TUI/Pixel.cs +++ b/Commandline/TUI/Pixel.cs @@ -88,7 +88,7 @@ namespace CC_Functions.Commandline.TUI /// First pixel to compare /// Second pixel to compare /// Whether they are equal - public static bool operator ==(Pixel a, Pixel b) => a.Equals(b); + public static bool operator ==(Pixel a, Pixel b) => a != null && a.Equals(b); /// /// Whether to pixels are not equal @@ -96,7 +96,7 @@ namespace CC_Functions.Commandline.TUI /// First pixel to compare /// Second pixel to compare /// Whether they are not equal - public static bool operator !=(Pixel a, Pixel b) => !a.Equals(b); + public static bool operator !=(Pixel a, Pixel b) => a != null && !a.Equals(b); /// /// Returns the content of this pixel