summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelgrouproles.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelgrouproles.cpp')
-rw-r--r--indra/newview/llpanelgrouproles.cpp28
1 files changed, 22 insertions, 6 deletions
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index 1c52c3cea4..50e1f84cad 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -144,17 +144,22 @@ BOOL LLPanelGroupRoles::postBuild()
if (!mSubTabContainer) return FALSE;
// Hook up each sub-tabs callback and widgets.
- S32 i;
- for (i = 0; i < mSubTabContainer->getTabCount(); ++i)
+ for (S32 i = 0; i < mSubTabContainer->getTabCount(); ++i)
{
- LLPanelGroupSubTab* subtabp = (LLPanelGroupSubTab*) mSubTabContainer->getPanelByIndex(i);
-
+ LLPanel* panel = mSubTabContainer->getPanelByIndex(i);
+ LLPanelGroupSubTab* subtabp = dynamic_cast<LLPanelGroupSubTab*>(panel);
+ if (!subtabp)
+ {
+ llwarns << "Invalid subtab panel: " << panel->getName() << llendl;
+ return FALSE;
+ }
// Add click callbacks to all the tabs.
mSubTabContainer->setCommitCallback(boost::bind(&LLPanelGroupRoles::handleClickSubTab, this));
// Hand the subtab a pointer to this LLPanelGroupRoles, so that it can
// look around for the widgets it is interested in.
- if (!subtabp->postBuildSubTab(this)) return FALSE;
+ if (!subtabp->postBuildSubTab(this))
+ return FALSE;
subtabp->addObserver(this);
}
@@ -1711,7 +1716,18 @@ void* LLPanelGroupRolesSubTab::createTab(void* data)
}
LLPanelGroupRolesSubTab::LLPanelGroupRolesSubTab(const LLUUID& group_id)
-: LLPanelGroupSubTab(group_id), mHasRoleChange(FALSE)
+ : LLPanelGroupSubTab(group_id),
+ mRolesList(NULL),
+ mAssignedMembersList(NULL),
+ mAllowedActionsList(NULL),
+ mRoleName(NULL),
+ mRoleTitle(NULL),
+ mRoleDescription(NULL),
+ mMemberVisibleCheck(NULL),
+ mDeleteRoleButton(NULL),
+ mCreateRoleButton(NULL),
+
+ mHasRoleChange(FALSE)
{
}