Skip to content
Snippets Groups Projects
Commit 6c9227df authored by Xiaohong Bao's avatar Xiaohong Bao
Browse files

fix for SH-2559: [crashhunters] crash in LLPluginMessage::generate()

discussed and reviewed by callum.
parent 51c7887f
Branches
Tags
No related merge requests found
......@@ -2450,10 +2450,24 @@ BOOL LLViewerMediaImpl::handleMouseUp(S32 x, S32 y, MASK mask)
//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMediaImpl::updateJavascriptObject()
{
static LLFrameTimer timer ;
if ( mMediaSource )
{
// flag to expose this information to internal browser or not.
bool enable = gSavedSettings.getBOOL("BrowserEnableJSObject");
if(!enable)
{
return ; //no need to go further.
}
if(timer.getElapsedTimeF32() < 1.0f)
{
return ; //do not update more than once per second.
}
timer.reset() ;
mMediaSource->jsEnableObject( enable );
// these values are only menaingful after login so don't set them before
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment