summaryrefslogtreecommitdiff
path: root/indra/llui/llconsole.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2026-05-20 14:14:46 -0400
committerGitHub <noreply@github.com>2026-05-20 14:14:46 -0400
commitacde43cce9700f5c5a50b03b7d96c1db18734e7e (patch)
tree885411015577dfaafa844fc8943d834c9d67bd7d /indra/llui/llconsole.cpp
parentdf844170600608b37c2725f7a263f1de3b055618 (diff)
parent7a40e2702f7d2a81e674f66f637261a09de5b9ca (diff)
Merge pull request #5844 from secondlife/geenz/26.3-to-develop
26.3 to Develop
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));