summaryrefslogtreecommitdiff
path: root/indra/newview/llmediactrl.cpp
diff options
context:
space:
mode:
authorStinson Linden <stinson@lindenlab.com>2014-05-05 23:24:34 +0100
committerStinson Linden <stinson@lindenlab.com>2014-05-05 23:24:34 +0100
commit001621dfc21942a6ae0075ca3eef31720f42477b (patch)
treecd86dcd3b02df87a76ee993e4bf98ec4e8223f5f /indra/newview/llmediactrl.cpp
parent205503dd84479be4989e5f5567a1d187cc0e71eb (diff)
MAINT-4009: Patching a small memory leak for when menu items were being created before the viewer window initialization had created the menu holder. Also, added llasserts in other cases when referencing the menu holder to ensure the holder is non-null.
Diffstat (limited to 'indra/newview/llmediactrl.cpp')
-rwxr-xr-xindra/newview/llmediactrl.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 323445afa6..90d4dd093b 100755
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -390,6 +390,8 @@ BOOL LLMediaCtrl::postBuild ()
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registar;
registar.add("Open.WebInspector", boost::bind(&LLMediaCtrl::onOpenWebInspector, this));
+ // stinson 05/05/2014 : cannot assert on the menu container being NULL because it will be during the processing of main_view.xml
+ // llassert(LLMenuGL::sMenuContainer != NULL);
mContextMenu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>(
"menu_media_ctrl.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance());
setVisibleCallback(boost::bind(&LLMediaCtrl::onVisibilityChanged, this, _2));
@@ -1117,3 +1119,8 @@ void LLMediaCtrl::setTrustedContent(bool trusted)
mMediaSource->setTrustedBrowser(trusted);
}
}
+
+void LLMediaCtrl::updateContextMenuParent(LLView* pNewParent)
+{
+ mContextMenu->updateParent(pNewParent);
+}