From 2e9c57f644c2ee03f3766102466225c0731f2daa Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 15 Mar 2013 22:14:34 +0000 Subject: [PATCH] Fix bug in AssetService where requesting data only for an asset would throw an exception if the asset did not exist. --- OpenSim/Services/AssetService/AssetService.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs index e7eb6fe924..422fd0aff3 100644 --- a/OpenSim/Services/AssetService/AssetService.cs +++ b/OpenSim/Services/AssetService/AssetService.cs @@ -146,7 +146,11 @@ namespace OpenSim.Services.AssetService return null; AssetBase asset = m_Database.GetAsset(assetID); - return asset.Data; + + if (asset != null) + return asset.Data; + else + return null; } public virtual bool Get(string id, Object sender, AssetRetrieved handler)