summaryrefslogtreecommitdiff
path: root/indra/llmessage/llassetstorage.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-05-04 09:36:39 -0400
committerOz Linden <oz@lindenlab.com>2011-05-04 09:36:39 -0400
commit3b79c9c81dc1ba4cb92f1ac54bd74a57e6d5aa05 (patch)
treecf27e69ff2bea8c621d1073172636146b8c73a57 /indra/llmessage/llassetstorage.cpp
parentc3df5f5d675abd107e1f0b4e3fb262226978ddb5 (diff)
parentb9bb792c478d703c6442351ecb563c0a67f77111 (diff)
merge changes for viewer-development before mesh merge
Diffstat (limited to 'indra/llmessage/llassetstorage.cpp')
-rw-r--r--indra/llmessage/llassetstorage.cpp23
1 files changed, 20 insertions, 3 deletions
diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp
index 27a368df3d..69d092de76 100644
--- a/indra/llmessage/llassetstorage.cpp
+++ b/indra/llmessage/llassetstorage.cpp
@@ -398,6 +398,12 @@ BOOL LLAssetStorage::hasLocalAsset(const LLUUID &uuid, const LLAssetType::EType
bool LLAssetStorage::findInStaticVFSAndInvokeCallback(const LLUUID& uuid, LLAssetType::EType type,
LLGetAssetCallback callback, void *user_data)
{
+ if (user_data)
+ {
+ // The *user_data should not be passed without a callback to clean it up.
+ llassert(callback != NULL)
+ }
+
BOOL exists = mStaticVFS->getExists(uuid, type);
if (exists)
{
@@ -432,15 +438,26 @@ void LLAssetStorage::getAssetData(const LLUUID uuid, LLAssetType::EType type, LL
llinfos << "ASSET_TRACE requesting " << uuid << " type " << LLAssetType::lookup(type) << llendl;
+ if (user_data)
+ {
+ // The *user_data should not be passed without a callback to clean it up.
+ llassert(callback != NULL)
+ }
+
if (mShutDown)
{
llinfos << "ASSET_TRACE cancelled " << uuid << " type " << LLAssetType::lookup(type) << " shutting down" << llendl;
- return; // don't get the asset or do any callbacks, we are shutting down
+
+ if (callback)
+ {
+ callback(mVFS, uuid, type, user_data, LL_ERR_ASSET_REQUEST_FAILED, LL_EXSTAT_NONE);
+ }
+ return;
}
-
+
if (uuid.isNull())
{
- // Special case early out for NULL uuid
+ // Special case early out for NULL uuid and for shutting down
if (callback)
{
callback(mVFS, uuid, type, user_data, LL_ERR_ASSET_REQUEST_NOT_IN_DATABASE, LL_EXSTAT_NULL_UUID);