From 7e1fbd1a897e3238a101f1db2d155f0493beaac5 Mon Sep 17 00:00:00 2001 From: Gilbert Gonzales Date: Tue, 2 Oct 2012 17:56:01 -0700 Subject: CHUI-102: Code review, just changed function getCurSelectedViewModelItem() to have a single return statement. --- indra/newview/llimfloatercontainer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimfloatercontainer.cpp b/indra/newview/llimfloatercontainer.cpp index 11aecde6e2..a33fc2c57e 100644 --- a/indra/newview/llimfloatercontainer.cpp +++ b/indra/newview/llimfloatercontainer.cpp @@ -737,14 +737,16 @@ void LLIMFloaterContainer::getSelectedUUIDs(uuid_vec_t& selected_uuids) const LLConversationItem * LLIMFloaterContainer::getCurSelectedViewModelItem() { + LLConversationItem * conversationItem = NULL; + if(mConversationsRoot && mConversationsRoot->getCurSelectedItem() && mConversationsRoot->getCurSelectedItem()->getViewModelItem()) { - return static_cast(mConversationsRoot->getCurSelectedItem()->getViewModelItem()); + conversationItem = static_cast(mConversationsRoot->getCurSelectedItem()->getViewModelItem()); } - return NULL; + return conversationItem; } void LLIMFloaterContainer::doToUsers(const std::string& command, uuid_vec_t selectedIDS) -- cgit v1.2.3