Skip to content
Snippets Groups Projects
Commit 40762b76 authored by maksymsproductengine's avatar maksymsproductengine
Browse files

MAINT-3110 FIXED new crash in LLNotificationsUI::LLHandlerUtil::logToIMP2P

parent 4833fada
No related branches found
No related tags found
No related merge requests found
......@@ -125,24 +125,29 @@ void log_name_callback(const std::string& full_name, const std::string& from_nam
// static
void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_file_only)
{
LLUUID from_id = notification->getPayload()["from_id"];
if (!gCacheName)
{
return;
}
if (from_id.isNull())
{
// Normal behavior for system generated messages, don't spam.
// llwarns << " from_id for notification " << notification->getName() << " is null " << llendl;
return;
}
LLUUID from_id = notification->getPayload()["from_id"];
if(to_file_only)
{
gCacheName->get(from_id, false, boost::bind(&log_name_callback, _2, "", notification->getMessage(), LLUUID()));
}
else
{
gCacheName->get(from_id, false, boost::bind(&log_name_callback, _2, INTERACTIVE_SYSTEM_FROM, notification->getMessage(), from_id));
}
if (from_id.isNull())
{
// Normal behavior for system generated messages, don't spam.
// llwarns << " from_id for notification " << notification->getName() << " is null " << llendl;
return;
}
if(to_file_only)
{
gCacheName->get(from_id, false, boost::bind(&log_name_callback, _2, "", notification->getMessage(), LLUUID()));
}
else
{
gCacheName->get(from_id, false, boost::bind(&log_name_callback, _2, INTERACTIVE_SYSTEM_FROM, notification->getMessage(), from_id));
}
}
// static
void LLHandlerUtil::logGroupNoticeToIMGroup(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment