Skip to content

Commit

Permalink
Address CodeQL issues, cleaner handling of possible null values.
Browse files Browse the repository at this point in the history
  • Loading branch information
mdickson committed Dec 2, 2023
1 parent 3ae8a7b commit b41152b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion OpenSim/Region/Framework/Scenes/LinksetData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,10 @@ public string CheckPasswordAndGetValue(string pass)
// Deep Copy of Current Entry
public LinksetDataEntry Copy()
{
return new LinksetDataEntry(String.Copy(Value), Password ?? String.Copy(Password));
string value = String.IsNullOrEmpty(Value) ? null : string.Copy(Value);
string password = String.IsNullOrEmpty(Password) ? null : string.Copy(Password);

return new LinksetDataEntry(value, password);
}

/// <summary>
Expand Down

0 comments on commit b41152b

Please sign in to comment.