summaryrefslogtreecommitdiff
path: root/indra/llmessage/message.cpp
diff options
context:
space:
mode:
authorCallum Prentice <callum@lindenlab.com>2014-03-17 14:19:42 -0700
committerCallum Prentice <callum@lindenlab.com>2014-03-17 14:19:42 -0700
commitf232096bba9280dd78ef378612eeb65ae2814307 (patch)
tree17da0d7b1bd17771691c461919bbba5f1780e905 /indra/llmessage/message.cpp
parent4c225e3fc7b92e68a25efdb1ca8927e266e84ae5 (diff)
parentcb91708332b8b8ddfe27808602ec5f43f11c24c2 (diff)
Merge with viewer-release
Diffstat (limited to 'indra/llmessage/message.cpp')
-rwxr-xr-xindra/llmessage/message.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp
index ae95087377..c3642ccbe8 100755
--- a/indra/llmessage/message.cpp
+++ b/indra/llmessage/message.cpp
@@ -3032,12 +3032,23 @@ void LLMessageSystem::setExceptionFunc(EMessageException e,
BOOL LLMessageSystem::callExceptionFunc(EMessageException exception)
{
callbacks_t::iterator it = mExceptionCallbacks.find(exception);
- if(it != mExceptionCallbacks.end())
+ if(it == mExceptionCallbacks.end())
{
- ((*it).second.first)(this, (*it).second.second,exception);
- return TRUE;
+ return FALSE;
}
- return FALSE;
+
+ exception_t& ex = it->second;
+ msg_exception_callback ex_cb = ex.first;
+
+ if (!ex_cb)
+ {
+ LL_WARNS("Messaging") << "LLMessageSystem::callExceptionFunc: bad message exception callback." << llendl;
+ return FALSE;
+ }
+
+ (ex_cb)(this, ex.second, exception);
+
+ return TRUE;
}
void LLMessageSystem::setTimingFunc(msg_timing_callback func, void* data)