diff --git a/renderdocui/Code/FormatElement.cs b/renderdocui/Code/FormatElement.cs index 65185ae14..29efacd23 100644 --- a/renderdocui/Code/FormatElement.cs +++ b/renderdocui/Code/FormatElement.cs @@ -80,8 +80,8 @@ namespace renderdocui.Code } public static bool operator ==(FormatElement x, FormatElement y) { - if ((object)x == null) return false; - if ((object)y == null) return false; + if ((object)x == null) return (object)y == null; + if ((object)y == null) return (object)x == null; return x.name == y.name && x.buffer == y.buffer && diff --git a/renderdocui/Interop/FetchInfo.cs b/renderdocui/Interop/FetchInfo.cs index c253660a8..b66680168 100644 --- a/renderdocui/Interop/FetchInfo.cs +++ b/renderdocui/Interop/FetchInfo.cs @@ -146,6 +146,9 @@ namespace renderdoc } public static bool operator ==(ResourceFormat x, ResourceFormat y) { + if ((object)x == null) return (object)y == null; + if ((object)y == null) return (object)x == null; + if (x.special || y.special) return x.special == y.special && x.specialFormat == y.specialFormat; diff --git a/renderdocui/Interop/Shader.cs b/renderdocui/Interop/Shader.cs index be5a3bfdc..3f13a93af 100644 --- a/renderdocui/Interop/Shader.cs +++ b/renderdocui/Interop/Shader.cs @@ -482,6 +482,9 @@ namespace renderdoc } public static bool operator ==(BindpointMap x, BindpointMap y) { + if ((object)x == null) return (object)y == null; + if ((object)y == null) return (object)x == null; + return x.bindset == y.bindset && x.bind == y.bind; }