summaryrefslogtreecommitdiff
path: root/indra/llui/llconsole.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2026-05-21 19:37:15 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2026-05-21 19:37:15 +0300
commit15d82beb6056fa16a1ea1cbf01c5d673a95e0267 (patch)
tree55af7639161926313434d9e4a8b9872369668d5d /indra/llui/llconsole.cpp
parentff536adef0b74c20f55bd501ad593e4eef762082 (diff)
parent6d4c4c029ce43aa413266135829cd2bc00001890 (diff)
Merge branch 'main' into marchcat/slua-26.2
# Conflicts: # indra/llfilesystem/lldir.cpp # indra/llfilesystem/llfilesystem.cpp # indra/newview/llappviewer.cpp # indra/newview/lltexturecache.cpp # indra/newview/llvoiceclient.cpp # indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
Diffstat (limited to 'indra/llui/llconsole.cpp')
-rw-r--r--indra/llui/llconsole.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp
index 91e6f281da..ca512a9883 100644
--- a/indra/llui/llconsole.cpp
+++ b/indra/llui/llconsole.cpp
@@ -67,6 +67,10 @@ LLConsole::LLConsole(const LLConsole::Params& p)
{
setFontSize(p.font_size_index);
}
+ if (mFont == nullptr)
+ {
+ setFontSize(0); // sans-serif
+ }
mFadeTime = mLinePersistTime - FADE_DURATION;
setMaxLines(LLUI::getInstance()->mSettingGroups["config"]->getS32("ConsoleMaxLines"));
}
@@ -79,6 +83,13 @@ void LLConsole::setLinePersistTime(F32 seconds)
void LLConsole::reshape(S32 width, S32 height, bool called_from_parent)
{
+ if (mFont == nullptr)
+ {
+ // not initialized yet
+ LL_WARNS() << "LLConsole::reshape called before font is set" << LL_ENDL;
+ return;
+ }
+
S32 new_width = llmax(50, llmin(getRect().getWidth(), width));
S32 new_height = llmax(mFont->getLineHeight() + 15, llmin(getRect().getHeight(), height));