summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp4
-rw-r--r--indra/llplugin/llpluginclassmedia.h8
-rw-r--r--indra/newview/llviewermedia.cpp3
3 files changed, 14 insertions, 1 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index 0c9b325b68..41ace62964 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -57,11 +57,15 @@ LLPluginClassMedia::LLPluginClassMedia(LLPluginClassMediaOwner *owner)
mOwner = owner;
mPlugin = NULL;
reset();
+
+ //debug use
+ mDeleteOK = true ;
}
LLPluginClassMedia::~LLPluginClassMedia()
{
+ llassert_always(mDeleteOK) ;
reset();
}
diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h
index 8c7b00f45b..66853c9940 100644
--- a/indra/llplugin/llpluginclassmedia.h
+++ b/indra/llplugin/llpluginclassmedia.h
@@ -373,6 +373,14 @@ protected:
F64 mCurrentRate;
F64 mLoadedDuration;
+//--------------------------------------
+ //debug use only
+ //
+private:
+ bool mDeleteOK ;
+public:
+ void setDeleteOK(bool flag) { mDeleteOK = flag ;}
+//--------------------------------------
};
#endif // LL_LLPLUGINCLASSMEDIA_H
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index fd2bb0fdf9..480d4e9e69 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -1578,6 +1578,7 @@ void LLViewerMediaImpl::destroyMediaSource()
if(mMediaSource)
{
+ mMediaSource->setDeleteOK(true) ;
delete mMediaSource;
mMediaSource = NULL;
}
@@ -1729,7 +1730,7 @@ bool LLViewerMediaImpl::initializePlugin(const std::string& media_type)
}
mMediaSource = media_source;
-
+ mMediaSource->setDeleteOK(false) ;
updateVolume();
return true;