summaryrefslogtreecommitdiff
path: root/indra/newview/llvoiceclient.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-15 17:32:55 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-15 17:32:55 +0000
commita2c6c09c5370b4068c91864e808fa8f970139ada (patch)
tree697b793b1aff64a3a7f261c2e51f391e25f4bca1 /indra/newview/llvoiceclient.cpp
parent38036b841291a19f36bd7a5d341c60482bb0351b (diff)
CID-209
Checker: REVERSE_INULL Function: LLVoiceClient::startUserIMSession(const LLUUID &) File: /indra/newview/llvoiceclient.cpp
Diffstat (limited to 'indra/newview/llvoiceclient.cpp')
-rw-r--r--indra/newview/llvoiceclient.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index f3bfc2e86c..3d153db733 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -5377,24 +5377,25 @@ LLVoiceClient::sessionState* LLVoiceClient::startUserIMSession(const LLUUID &uui
// No session with user, need to start one.
std::string uri = sipURIFromID(uuid);
session = addSession(uri);
+
+ llassert(session);
+ if (!session) return NULL;
+
session->mIsSpatial = false;
session->mReconnect = false;
session->mIsP2P = true;
session->mCallerID = uuid;
}
- if(session)
+ if(session->mHandle.empty())
{
- if(session->mHandle.empty())
- {
- // Session isn't active -- start it up.
- sessionCreateSendMessage(session, false, true);
- }
- else
- {
- // Session is already active -- start up text.
- sessionTextConnectSendMessage(session);
- }
+ // Session isn't active -- start it up.
+ sessionCreateSendMessage(session, false, true);
+ }
+ else
+ {
+ // Session is already active -- start up text.
+ sessionTextConnectSendMessage(session);
}
return session;