diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2009-11-24 14:39:39 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2009-11-24 14:39:39 -0500 |
commit | c812c616ea0ba6531b3fe7f75efc815081cd0c2e (patch) | |
tree | 2d966b5ba9fae58a3369055fadd6192b417c7f46 /indra/newview/llvovolume.cpp | |
parent | fc6cfc27bec61ac1f66c1304cc7b54f19157584e (diff) | |
parent | a22bb00530bb779d8e5bb40b68e55767604d88dc (diff) |
merge
--HG--
branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r-- | indra/newview/llvovolume.cpp | 39 |
1 files changed, 32 insertions, 7 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 1f49cd30c7..48bd387022 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -140,6 +140,9 @@ public: virtual std::string getCapabilityUrl(const std::string &name) const { return mObject->getRegion()->getCapability(name); } + virtual bool isDead() const + { return mObject->isDead(); } + private: LLPointer<LLVOVolume> mObject; }; @@ -183,6 +186,22 @@ LLVOVolume::~LLVOVolume() } } +void LLVOVolume::markDead() +{ + if (!mDead) + { + // TODO: tell LLMediaDataClient to remove this object from its queue + + // Detach all media impls from this object + for(U32 i = 0 ; i < mMediaImplList.size() ; i++) + { + removeMediaImpl(i); + } + } + + LLViewerObject::markDead(); +} + // static void LLVOVolume::initClass() @@ -1708,10 +1727,16 @@ void LLVOVolume::updateObjectMediaData(const LLSD &media_data_array) void LLVOVolume::syncMediaData(S32 texture_index, const LLSD &media_data, bool merge, bool ignore_agent) { + if(mDead) + { + // If the object has been marked dead, don't process media updates. + return; + } + LLTextureEntry *te = getTE(texture_index); - //llinfos << "BEFORE: texture_index = " << texture_index - // << " hasMedia = " << te->hasMedia() << " : " - // << ((NULL == te->getMediaData()) ? "NULL MEDIA DATA" : ll_pretty_print_sd(te->getMediaData()->asLLSD())) << llendl; + LL_DEBUGS("MediaOnAPrim") << "BEFORE: texture_index = " << texture_index + << " hasMedia = " << te->hasMedia() << " : " + << ((NULL == te->getMediaData()) ? "NULL MEDIA DATA" : ll_pretty_print_sd(te->getMediaData()->asLLSD())) << llendl; std::string previous_url; LLMediaEntry* mep = te->getMediaData(); @@ -1751,9 +1776,9 @@ void LLVOVolume::syncMediaData(S32 texture_index, const LLSD &media_data, bool m removeMediaImpl(texture_index); } - //llinfos << "AFTER: texture_index = " << texture_index - // << " hasMedia = " << te->hasMedia() << " : " - // << ((NULL == te->getMediaData()) ? "NULL MEDIA DATA" : ll_pretty_print_sd(te->getMediaData()->asLLSD())) << llendl; + LL_DEBUGS("MediaOnAPrim") << "AFTER: texture_index = " << texture_index + << " hasMedia = " << te->hasMedia() << " : " + << ((NULL == te->getMediaData()) ? "NULL MEDIA DATA" : ll_pretty_print_sd(te->getMediaData()->asLLSD())) << llendl; } void LLVOVolume::mediaNavigateBounceBack(U8 texture_index) @@ -1776,7 +1801,7 @@ void LLVOVolume::mediaNavigateBounceBack(U8 texture_index) } if (! url.empty()) { - LL_INFOS("LLMediaDataClient") << "bouncing back to URL: " << url << LL_ENDL; + LL_INFOS("MediaOnAPrim") << "bouncing back to URL: " << url << LL_ENDL; impl->navigateTo(url, "", false, true); } } |