Fixed crash (when clicking on empty friend list).

This commit is contained in:
hiker
2014-03-07 16:33:07 +11:00
parent 3c1a7b1c7b
commit f86646abb9

View File

@@ -105,7 +105,8 @@ void OnlineProfileFriends::eventCallback(Widget* widget,
else if (name == m_friends_list_widget->m_properties[GUIEngine::PROP_ID])
{
int index = m_friends_list_widget->getSelectionID();
new UserInfoDialog(m_visiting_profile->getFriends()[index]);
if (index>-1)
new UserInfoDialog(m_visiting_profile->getFriends()[index]);
}
} // eventCallback