Browse Source

mantis 8844: fix PARCEL_MEDIA_COMMAND_URL with empty string parameter

UbitUmarov 3 years ago
parent
commit
aff1593b2b
1 changed files with 12 additions and 7 deletions
  1. 12 7
      OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs

+ 12 - 7
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs

@@ -13363,14 +13363,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
                             if (commandList.Data[i + 1] is LSL_String)
                             {
                                 url = (LSL_String)commandList.Data[i + 1];
-                                try
-                                {
-                                    Uri dummy = new Uri(url, UriKind.Absolute);
-                                }
-                                catch
+                                if(string.IsNullOrWhiteSpace(url))
+                                    url = string.Empty;
+                                else
                                 {
-                                    Error("llParcelMediaCommandList", "invalid PARCEL_MEDIA_COMMAND_URL");
-                                    return;
+                                    try
+                                    {
+                                        Uri dummy = new Uri(url, UriKind.Absolute);
+                                    }
+                                    catch
+                                    {
+                                        Error("llParcelMediaCommandList", "invalid PARCEL_MEDIA_COMMAND_URL");
+                                        return;
+                                    }
                                 }
                                 update = true;
                             }