From b41152beb09f4211cc08a82baee2693c341ed2a7 Mon Sep 17 00:00:00 2001
From: Mike Dickson <mike.dickson@utopiaskye.com>
Date: Sat, 2 Dec 2023 15:52:45 -0500
Subject: [PATCH] Address CodeQL issues, cleaner handling of possible null
 values.

---
 OpenSim/Region/Framework/Scenes/LinksetData.cs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/OpenSim/Region/Framework/Scenes/LinksetData.cs b/OpenSim/Region/Framework/Scenes/LinksetData.cs
index c5607e6eb04..8f8278a7b29 100644
--- a/OpenSim/Region/Framework/Scenes/LinksetData.cs
+++ b/OpenSim/Region/Framework/Scenes/LinksetData.cs
@@ -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>