CHUI-953 (Viewer does not quit after confirming to quit first time)

Added missing "else" statement
meow-7.2.2
mberezhnoy 2013-06-07 20:05:43 +03:00
parent 15b6a395d0
commit 0b458690ce
1 changed files with 14 additions and 12 deletions

View File

@ -2141,21 +2141,23 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/)
closeAllConversations();
onClickCloseBtn();
}
// Check for currently active session
LLUUID session_id = getSelectedSession();
// If current session is Nearby Chat or there is only one session remaining, close the floater
if (mConversationsItems.size() == 1 || session_id == LLUUID() || app_quitting)
{
onClickCloseBtn();
}
else
{
// Otherwise, close current conversation
LLFloaterIMSessionTab* active_conversation = LLFloaterIMSessionTab::getConversation(session_id);
if (active_conversation)
// Check for currently active session
LLUUID session_id = getSelectedSession();
// If current session is Nearby Chat or there is only one session remaining, close the floater
if (mConversationsItems.size() == 1 || session_id == LLUUID() || app_quitting)
{
active_conversation->closeFloater();
onClickCloseBtn();
}
else
{
// Otherwise, close current conversation
LLFloaterIMSessionTab* active_conversation = LLFloaterIMSessionTab::getConversation(session_id);
if (active_conversation)
{
active_conversation->closeFloater();
}
}
}
}