Commits

Vadim Savchuk committed ddaff82

EXP-1879 FIXED Crash in People floater in mouselook mode.

Comments (0)

Files changed (2)

indra/newview/llfloateravatarpicker.cpp

 	// *TODO: Use a key to allow this not to be an effective singleton
 	LLFloaterAvatarPicker* floater = 
 		LLFloaterReg::showTypedInstance<LLFloaterAvatarPicker>("avatar_picker");
+	if (!floater)
+	{
+		llwarns << "Cannot instantiate avatar picker" << llendl;
+		return NULL;
+	}
 	
 	floater->mSelectionCallback = callback;
 	floater->setAllowMultiple(allow_multiple);

indra/newview/llpanelpeople.cpp

 {
 	// Show add friend wizard.
 	LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(boost::bind(&LLPanelPeople::onAvatarPicked, _1, _2), FALSE, TRUE);
+	if (!picker)
+	{
+		return;
+	}
+
 	// Need to disable 'ok' button when friend occurs in selection
-	if (picker)	picker->setOkBtnEnableCb(boost::bind(&LLPanelPeople::isItemsFreeOfFriends, this, _1));
+	picker->setOkBtnEnableCb(boost::bind(&LLPanelPeople::isItemsFreeOfFriends, this, _1));
 	LLFloater* root_floater = gFloaterView->getParentFloater(this);
 	if (root_floater)
 	{