diff options
author | UbitUmarov | 2019-09-03 15:21:25 +0100 |
---|---|---|
committer | UbitUmarov | 2019-09-03 15:21:25 +0100 |
commit | fc550e2b3eab449b7018e177369680fec6bff554 (patch) | |
tree | f2e51ab8d7a5ca83b3fcb2c87893173bc776d364 /OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | |
parent | mantis 8585: add a bit more debug messages (diff) | |
download | opensim-SC-fc550e2b3eab449b7018e177369680fec6bff554.zip opensim-SC-fc550e2b3eab449b7018e177369680fec6bff554.tar.gz opensim-SC-fc550e2b3eab449b7018e177369680fec6bff554.tar.bz2 opensim-SC-fc550e2b3eab449b7018e177369680fec6bff554.tar.xz |
avoid potencial null ref
Diffstat (limited to 'OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs')
-rwxr-xr-x | OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index b42759d..03d023c 100755 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | |||
@@ -1250,6 +1250,8 @@ namespace OpenSim.Region.CoreModules.Asset | |||
1250 | { | 1250 | { |
1251 | AssetBase asset; | 1251 | AssetBase asset; |
1252 | Get(id, out asset); | 1252 | Get(id, out asset); |
1253 | if (asset == null) | ||
1254 | return null; | ||
1253 | return asset.Metadata; | 1255 | return asset.Metadata; |
1254 | } | 1256 | } |
1255 | 1257 | ||
@@ -1257,6 +1259,8 @@ namespace OpenSim.Region.CoreModules.Asset | |||
1257 | { | 1259 | { |
1258 | AssetBase asset; | 1260 | AssetBase asset; |
1259 | Get(id, out asset); | 1261 | Get(id, out asset); |
1262 | if (asset == null) | ||
1263 | return null; | ||
1260 | return asset.Data; | 1264 | return asset.Data; |
1261 | } | 1265 | } |
1262 | 1266 | ||