From 772990d4217f9d64898af97e33bb12fa58ede1b8 Mon Sep 17 00:00:00 2001 From: Nuno Date: Mon, 17 May 2021 19:09:43 +0200 Subject: [PATCH] Added missing check when get node --- code/ryzom/client/src/interface_v3/chat_window.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/chat_window.cpp b/code/ryzom/client/src/interface_v3/chat_window.cpp index 9340377f9..f1335b95d 100644 --- a/code/ryzom/client/src/interface_v3/chat_window.cpp +++ b/code/ryzom/client/src/interface_v3/chat_window.cpp @@ -216,7 +216,7 @@ void CChatWindow::displayMessage(const ucstring &msg, NLMISC::CRGBA col, CChatGr gl = dynamic_cast(_Chat->getGroup("cb:text_list")); - + bool noTranslation = false; CCDBNodeLeaf *nodeNoTranslation = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:TRANSLATION:" + toUpper(CChatGroup::groupTypeToString(gt)) + ":DISABLE", false); @@ -233,7 +233,7 @@ void CChatWindow::displayMessage(const ucstring &msg, NLMISC::CRGBA col, CChatGr msgNoTranslate = msg.substr(0, startTr) + msg.substr(startTr+5, endOfOriginal-startTr-5); } } - + CViewBase *child = ctm.createMsgText(msgNoTranslate, col); if (child) { @@ -586,8 +586,10 @@ void CChatGroupWindow::displayMessage(const ucstring &msg, NLMISC::CRGBA col, CC ucstring newmsg = msg; ucstring prefix; + bool noTranslation = false; CCDBNodeLeaf *nodeNoTranslation = NLGUI::CDBManager::getInstance()->getDbProp("UI:SAVE:TRANSLATION:" + toUpper(CChatGroup::groupTypeToString(gt)) + ":DISABLE", false); - bool noTranslation = nodeNoTranslation->getValueBool(); + if (nodeNoTranslation) + noTranslation = nodeNoTranslation->getValueBool(); if (noTranslation) { string::size_type startTr = msg.find(ucstring("{:"));