diff options
author | Stinson Linden <stinson@lindenlab.com> | 2014-05-05 23:24:34 +0100 |
---|---|---|
committer | Stinson Linden <stinson@lindenlab.com> | 2014-05-05 23:24:34 +0100 |
commit | 001621dfc21942a6ae0075ca3eef31720f42477b (patch) | |
tree | cd86dcd3b02df87a76ee993e4bf98ec4e8223f5f /indra/newview/llmediactrl.cpp | |
parent | 205503dd84479be4989e5f5567a1d187cc0e71eb (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-x | indra/newview/llmediactrl.cpp | 7 |
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); +} |