SOCIAL-364 FIX Viewer Crash when selecting Browse Linden Homes button from side panel

meow-7.2.2
callum 2010-12-10 12:42:21 -08:00
parent 61b675e0af
commit 5f01d6a686
1 changed files with 21 additions and 1 deletions

View File

@ -1333,7 +1333,27 @@ void LLMediaCtrl::onPopup(const LLSD& notification, const LLSD& response)
{
if (response["open"])
{
std::string floater_name = gFloaterView->getParentFloater(this)->getInstanceName();
// name of default floater to open
std::string floater_name = "web_content";
// look for parent floater name
if ( gFloaterView )
{
if ( gFloaterView->getParentFloater(this) )
{
floater_name = gFloaterView->getParentFloater(this)->getInstanceName();
}
else
{
lldebugs << "No gFloaterView->getParentFloater(this) for onPopuup()" << llendl;
};
}
else
{
lldebugs << "No gFloaterView for onPopuup()" << llendl;
};
// open the same kind of floater as parent if possible
if ( floater_name == "media_browser" )
{
LLWeb::loadURL(notification["payload"]["url"], notification["payload"]["target"], notification["payload"]["uuid"]);