diff options
author | Steve Bennetts <steve@lindenlab.com> | 2009-11-06 18:04:29 -0800 |
---|---|---|
committer | Steve Bennetts <steve@lindenlab.com> | 2009-11-06 18:04:29 -0800 |
commit | 5e85642650d4ffa822b749c5a4a211531545d660 (patch) | |
tree | fb44797d6c95bd7e439f01c13365a6dcfe71ea3f /indra/newview | |
parent | 485dcd9a8f89e885ceb290e70749fcb48767fdc6 (diff) |
Temp fix to prevent crash while missing sidepanel_task_info.xml.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llsidepanelinventory.cpp | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 3a1b354c50..6aa5c53194 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -95,8 +95,11 @@ BOOL LLSidepanelInventory::postBuild() // UI elements from task panel
{
mTaskPanel = getChild<LLSidepanelTaskInfo>("sidepanel__task_panel");
- LLButton* back_btn = mTaskPanel->getChild<LLButton>("back_btn");
- back_btn->setClickedCallback(boost::bind(&LLSidepanelInventory::onBackButtonClicked, this));
+ if (mTaskPanel)
+ {
+ LLButton* back_btn = mTaskPanel->getChild<LLButton>("back_btn");
+ back_btn->setClickedCallback(boost::bind(&LLSidepanelInventory::onBackButtonClicked, this));
+ }
}
return TRUE;
@@ -120,7 +123,8 @@ void LLSidepanelInventory::onOpen(const LLSD& key) }
if (key.has("task"))
{
- mTaskPanel->setObjectSelection(LLSelectMgr::getInstance()->getSelection());
+ if (mTaskPanel)
+ mTaskPanel->setObjectSelection(LLSelectMgr::getInstance()->getSelection());
showTaskInfoPanel();
}
}
@@ -184,7 +188,8 @@ void LLSidepanelInventory::onSelectionChange(const std::deque<LLFolderViewItem*> void LLSidepanelInventory::showItemInfoPanel()
{
mItemPanel->setVisible(TRUE);
- mTaskPanel->setVisible(FALSE);
+ if (mTaskPanel)
+ mTaskPanel->setVisible(FALSE);
mInventoryPanel->setVisible(FALSE);
mItemPanel->dirty();
@@ -194,17 +199,21 @@ void LLSidepanelInventory::showItemInfoPanel() void LLSidepanelInventory::showTaskInfoPanel()
{
mItemPanel->setVisible(FALSE);
- mTaskPanel->setVisible(TRUE);
mInventoryPanel->setVisible(FALSE);
- mTaskPanel->dirty();
- mTaskPanel->setIsEditing(FALSE);
+ if (mTaskPanel)
+ {
+ mTaskPanel->setVisible(TRUE);
+ mTaskPanel->dirty();
+ mTaskPanel->setIsEditing(FALSE);
+ }
}
void LLSidepanelInventory::showInventoryPanel()
{
mItemPanel->setVisible(FALSE);
- mTaskPanel->setVisible(FALSE);
+ if (mTaskPanel)
+ mTaskPanel->setVisible(FALSE);
mInventoryPanel->setVisible(TRUE);
updateVerbs();
}
|