From 413dffc7cf71ff53af8a384d01fd4ef6611a99c7 Mon Sep 17 00:00:00 2001 From: alexiscatnip Date: Sun, 6 Feb 2022 13:27:21 +0800 Subject: [PATCH] prevent Asset fetch when not logged in. in LibreMetaverse. --- Assets/Plugins/LibreMetaverse/AssetManager.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Assets/Plugins/LibreMetaverse/AssetManager.cs b/Assets/Plugins/LibreMetaverse/AssetManager.cs index c86ac65..c687457 100644 --- a/Assets/Plugins/LibreMetaverse/AssetManager.cs +++ b/Assets/Plugins/LibreMetaverse/AssetManager.cs @@ -638,6 +638,14 @@ namespace OpenMetaverse return; } + // Guard clause: + // if the sound is not cached, and we are not connected, + // then we skip any network download. + if (!Client.Network.Connected) + { + return; + } + // If ViewerAsset capability exists, use that, if not, fallback to UDP (which is obsoleted on Second Life.) if (Client.Network.CurrentSim.Caps != null && Client.Network.CurrentSim.Caps.CapabilityURI("ViewerAsset") != null)