summaryrefslogtreecommitdiff
path: root/indra/llplugin/llpluginclassmedia.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llplugin/llpluginclassmedia.cpp')
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index e09b511a6e..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();
}
@@ -160,7 +164,7 @@ void LLPluginClassMedia::idle(void)
mPlugin->idle();
}
- if((mMediaWidth == -1) || (!mTextureParamsReceived) || (mPlugin == NULL))
+ if((mMediaWidth == -1) || (!mTextureParamsReceived) || (mPlugin == NULL) || (mPlugin->isBlocked()))
{
// Can't process a size change at this time
}
@@ -437,6 +441,12 @@ void LLPluginClassMedia::mouseEvent(EMouseEventType type, int button, int x, int
{
if(type == MOUSE_EVENT_MOVE)
{
+ if(!mPlugin || !mPlugin->isRunning() || mPlugin->isBlocked())
+ {
+ // Don't queue up mouse move events that can't be delivered.
+ return;
+ }
+
if((x == mLastMouseX) && (y == mLastMouseY))
{
// Don't spam unnecessary mouse move events.