diff options
| author | Erik Kundiman <erik@megapahit.org> | 2026-05-06 06:31:09 +0800 |
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2026-05-06 06:31:09 +0800 |
| commit | 9046c29deefe06be254747458218f3a5409db484 (patch) | |
| tree | 49a8b6bd48915542b21ddbfb3842d44d1fef2170 /indra/llui/llconsole.cpp | |
| parent | 1f6bf2ac2f9829102929cbda398e9fae824bf129 (diff) | |
| parent | b44809f740d307615526060e7b57e7705c292347 (diff) | |
Merge tag 'Second_Life_Release#b44809f7-26.2' into 2026.02
Diffstat (limited to 'indra/llui/llconsole.cpp')
| -rw-r--r-- | indra/llui/llconsole.cpp | 11 |
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)); |
