diff options
author | Justin Clark-Casey (justincc) | 2013-03-15 22:14:34 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-03-15 22:14:34 +0000 |
commit | d05af4bdad7d4855b05eba909c5b21714e5f438a (patch) | |
tree | 9049ed120d8dfa7db8869eb90961ba886a3231d7 /OpenSim/Services/AssetService | |
parent | minor: log an error rather than info if a connector fails to load. (diff) | |
download | opensim-SC-d05af4bdad7d4855b05eba909c5b21714e5f438a.zip opensim-SC-d05af4bdad7d4855b05eba909c5b21714e5f438a.tar.gz opensim-SC-d05af4bdad7d4855b05eba909c5b21714e5f438a.tar.bz2 opensim-SC-d05af4bdad7d4855b05eba909c5b21714e5f438a.tar.xz |
Fix bug in AssetService where requesting data only for an asset would throw an exception if the asset did not exist.
Diffstat (limited to 'OpenSim/Services/AssetService')
-rw-r--r-- | OpenSim/Services/AssetService/AssetService.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenSim/Services/AssetService/AssetService.cs b/OpenSim/Services/AssetService/AssetService.cs index e7eb6fe..422fd0a 100644 --- a/OpenSim/Services/AssetService/AssetService.cs +++ b/OpenSim/Services/AssetService/AssetService.cs | |||
@@ -146,7 +146,11 @@ namespace OpenSim.Services.AssetService | |||
146 | return null; | 146 | return null; |
147 | 147 | ||
148 | AssetBase asset = m_Database.GetAsset(assetID); | 148 | AssetBase asset = m_Database.GetAsset(assetID); |
149 | return asset.Data; | 149 | |
150 | if (asset != null) | ||
151 | return asset.Data; | ||
152 | else | ||
153 | return null; | ||
150 | } | 154 | } |
151 | 155 | ||
152 | public virtual bool Get(string id, Object sender, AssetRetrieved handler) | 156 | public virtual bool Get(string id, Object sender, AssetRetrieved handler) |