summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authormaksymsproductengine <maksymsproductengine@lindenlab.com>2013-11-12 20:05:45 +0200
committermaksymsproductengine <maksymsproductengine@lindenlab.com>2013-11-12 20:05:45 +0200
commit241259820c0461e90ad71a78fcd751a16892a5a6 (patch)
treee93724bfff8d64494e086ba06baf7c378d568d81 /indra
parent44eaa10b80bfe46b0fdab147f3addb45f4720cfc (diff)
MAINT-3269 FIXED crash in LLMessageSystem::callExceptionFunc
Diffstat (limited to 'indra')
-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)