Changed: #1135 Some crashes under Linux

This commit is contained in:
kervala 2010-10-18 23:21:24 +02:00
parent 9c402731d7
commit 7c92afd5fc
3 changed files with 15 additions and 8 deletions

View file

@ -959,7 +959,7 @@ void CClientChatManager::buildTellSentence(const ucstring &sender, const ucstrin
bool bWoman = entity && entity->getGender() == GSGENDER::female;
name = STRING_MANAGER::CStringManagerClient::getTitleLocalizedName(CEntityCL::getTitleFromName(sender), bWoman);
}
}
else
{
// Does the char have a CSR title?
@ -967,7 +967,8 @@ void CClientChatManager::buildTellSentence(const ucstring &sender, const ucstrin
}
ucstring cur_time;
if (CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false)->getValueBool())
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false);
if (pNL && pNL->getValueBool())
{
cur_time = CInterfaceManager::getTimestampHuman();
}
@ -1008,7 +1009,8 @@ void CClientChatManager::buildChatSentence(TDataSetIndex /* compressedSenderInde
ucstring cur_time;
if (cat.toString() != "&bbl&")
{
if (CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false)->getValueBool())
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false);
if (pNL && pNL->getValueBool())
{
cur_time = CInterfaceManager::getTimestampHuman();
}
@ -1183,11 +1185,13 @@ class CHandlerTell : public IActionHandler
ucstring finalMsg;
CChatWindow::encodeColorTag(prop.getRGBA(), finalMsg, false);
ucstring cur_time;
if (CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false)->getValueBool())
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false);
if (pNL && pNL->getValueBool())
{
cur_time = CInterfaceManager::getTimestampHuman();
}
ucstring csr = CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw()) ? "(CSR) " : "";
ucstring csr;
if (CHARACTER_TITLE::isCsrTitle(UserEntity->getTitleRaw())) csr += ucstring("(CSR) ");
finalMsg += cur_time + csr + CI18N::get("youTell") + ": ";
prop.readRGBA("UI:SAVE:CHAT:COLORS:TELL"," ");
CChatWindow::encodeColorTag(prop.getRGBA(), finalMsg, true);

View file

@ -473,7 +473,8 @@ void CChatWindow::displayLocalPlayerTell(const ucstring &msg, uint numBlinks /*=
prop.readRGBA("UI:SAVE:CHAT:COLORS:SPEAKER"," ");
encodeColorTag(prop.getRGBA(), finalMsg, false);
ucstring cur_time;
if (CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false)->getValueBool())
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false);
if (pNL && pNL->getValueBool())
{
cur_time = CInterfaceManager::getTimestampHuman();
}

View file

@ -465,7 +465,8 @@ void CPeopleList::displayLocalPlayerTell(uint index,const ucstring &msg,uint num
}
ucstring cur_time;
if (CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false)->getValueBool())
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false);
if (pNL && pNL->getValueBool())
{
cur_time = CInterfaceManager::getTimestampHuman();
}
@ -936,7 +937,8 @@ class CHandlerContactEntry : public IActionHandler
ucstring final;
CChatWindow::encodeColorTag(prop.getRGBA(), final, false);
ucstring cur_time;
if (CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false)->getValueBool())
CCDBNodeLeaf *pNL = CInterfaceManager::getInstance()->getDbProp("UI:SAVE:CHAT:SHOW_TIMES_IN_CHAT_CB", false);
if (pNL && pNL->getValueBool())
{
cur_time = CInterfaceManager::getTimestampHuman();
}