Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions indra/llui/llconsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
}
Expand All @@ -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));

Expand Down
Loading