avoid potencial null ref

0.9.1.0-post-fixes
UbitUmarov 2019-09-03 15:21:25 +01:00
parent 3aae1d0918
commit fc550e2b3e
1 changed files with 4 additions and 0 deletions

View File

@ -1250,6 +1250,8 @@ namespace OpenSim.Region.CoreModules.Asset
{ {
AssetBase asset; AssetBase asset;
Get(id, out asset); Get(id, out asset);
if (asset == null)
return null;
return asset.Metadata; return asset.Metadata;
} }
@ -1257,6 +1259,8 @@ namespace OpenSim.Region.CoreModules.Asset
{ {
AssetBase asset; AssetBase asset;
Get(id, out asset); Get(id, out asset);
if (asset == null)
return null;
return asset.Data; return asset.Data;
} }