summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorcallum <none@none>2010-12-10 12:42:21 -0800
committercallum <none@none>2010-12-10 12:42:21 -0800
commit5f01d6a6861fdcd4c9c09e60a631ed92d2b15a82 (patch)
tree061d6ac20cc2d0b3f5b7e504ac70d272219aeaf5 /indra/newview
parent61b675e0afb96d1d46b1f36a8d54bb8146ef27d6 (diff)
SOCIAL-364 FIX Viewer Crash when selecting Browse Linden Homes button from side panel
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llmediactrl.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index eaa2a60938..276ffffec4 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -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"]);