- Added null checks in a couple places.

Baker Linden 2014-03-11 16:19:49 -07:00
parent 910b40c120
commit b0c1dd4790
2 changed files with 11 additions and 0 deletions

View File

@ -184,6 +184,11 @@ void LLPanelGroupInvite::submit()
std::map<LLUUID, LLUUID> role_member_pairs;
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mImplementation->mGroupID);
if(!gdatap)
{
LL_WARNS("Groups") << "Unable to get group data for group " << mImplementation->mGroupID << LL_ENDL;
return;
}
// Default to everyone role.
LLUUID role_id = LLUUID::null;

View File

@ -1903,6 +1903,12 @@ bool LLPanelGroupRolesSubTab::needsApply(std::string& mesg)
lldebugs << "LLPanelGroupRolesSubTab::needsApply()" << llendl;
LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);
if(!gdatap)
{
llwarns << "Unable to get group data for group " << mGroupID << llendl;
return;
}
return (mHasRoleChange // Text changed in current role
|| (gdatap && gdatap->pendingRoleChanges())); // Pending role changes in the group