summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2011-03-19 00:57:10 -0700
committerRichard Linden <none@none>2011-03-19 00:57:10 -0700
commit35c39d92e732c7e377697480a073995dd0a6fe7c (patch)
treeb06cab26946cb0233cc891a5836128d6f313c8e4 /indra/newview/llviewermenu.cpp
parent1db1c3443ea4e9cde52bfb3c0e127426f02a742f (diff)
SOCIAL-762 FIX Viewer crash if first startup (with cleared settings.xml file) is in Advanced mode
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 3e0363849b..ec72df79d1 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -846,9 +846,13 @@ class LLAdvancedCheckFeature : public view_listener_t
void toggle_destination_and_avatar_picker(const LLSD& show)
{
S32 panel_idx = show.isDefined() ? show.asInteger() : -1;
- LLView* container = gViewerWindow->getRootView()->getChildView("avatar_picker_and_destination_guide_container");
+ LLView* container = gViewerWindow->getRootView()->findChildView("avatar_picker_and_destination_guide_container");
+ if (!container) return;
+
LLMediaCtrl* destinations = container->findChild<LLMediaCtrl>("destination_guide_contents");
LLMediaCtrl* avatar_picker = container->findChild<LLMediaCtrl>("avatar_picker_contents");
+ if (!destinations || !avatar_picker) return;
+
LLButton* avatar_btn = gViewerWindow->getRootView()->getChildView("bottom_tray")->getChild<LLButton>("avatar_btn");
LLButton* destination_btn = gViewerWindow->getRootView()->getChildView("bottom_tray")->getChild<LLButton>("destination_btn");