Skip to content

Commit

Permalink
[NUI] Handles null argument ControlState.Equals
Browse files Browse the repository at this point in the history
Signed-off-by: Jiyun Yang <[email protected]>
  • Loading branch information
rabbitfor committed Jan 14, 2025
1 parent a3cc621 commit 5a806be
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Tizen.NUI/src/public/BaseComponents/ControlState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,13 @@ public bool Contains(ControlState state)

/// <inheritdoc/>
[EditorBrowsable(EditorBrowsableState.Never)]
public bool Equals(ControlState other) => value.Equals(other.value);
public bool Equals(ControlState other)
{
if (other is null)
return false;

return value.Equals(other.value);
}

/// <inheritdoc/>
/// <since_tizen> 9 </since_tizen>
Expand Down

0 comments on commit 5a806be

Please sign in to comment.