Fix crash signature 9141

This commit is contained in:
Inusaito Sayori
2015-02-04 00:02:09 -05:00
parent c3e9150125
commit ef5b95d5b9

View File

@@ -70,6 +70,8 @@
#include "rlvhandler.h"
// [/RLVa:KB]
#include <boost/algorithm/string/predicate.hpp>
//
// Global statics
//
@@ -501,7 +503,7 @@ LLColor4 get_text_color(const LLChat& chat, bool from_im)
}
static const LLCachedControl<bool> sKeywordsChangeColor(gSavedPerAccountSettings, "KeywordsChangeColor", false);
if (sKeywordsChangeColor && gAgentID != chat.mFromID && chat.mSourceType != CHAT_SOURCE_SYSTEM && AscentKeyword::hasKeyword(chat.mText.substr(chat.mFromName.length()), 1))
if (sKeywordsChangeColor && gAgentID != chat.mFromID && chat.mSourceType != CHAT_SOURCE_SYSTEM && AscentKeyword::hasKeyword(boost::starts_with(chat.mText, chat.mFromName) ? chat.mText.substr(chat.mFromName.length()) : chat.mText, 1))
{
static const LLCachedControl<LLColor4> sKeywordsColor(gSavedPerAccountSettings, "KeywordsColor", LLColor4(1.f, 1.f, 1.f, 1.f));
text_color = sKeywordsColor;