From fc550e2b3eab449b7018e177369680fec6bff554 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 3 Sep 2019 15:21:25 +0100 Subject: [PATCH] avoid potencial null ref --- OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index b42759d114..03d023c828 100755 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs @@ -1250,6 +1250,8 @@ namespace OpenSim.Region.CoreModules.Asset { AssetBase asset; Get(id, out asset); + if (asset == null) + return null; return asset.Metadata; } @@ -1257,6 +1259,8 @@ namespace OpenSim.Region.CoreModules.Asset { AssetBase asset; Get(id, out asset); + if (asset == null) + return null; return asset.Data; }