Fix SmileTextRender crash

Fixes #22
This commit is contained in:
Jaidyn Ann 2021-07-13 17:11:49 -05:00
parent 5ec79ebbf5
commit 7f30571703

View File

@ -35,8 +35,10 @@ RenderView::AppendMessage(const char* nick, const char* message,
Append("<", nameColor, bg, nameColor, time);
Append(nick, fg, bg, fg);
Append("> ", nameColor, bg, nameColor);
// AddEmoticText(message, fg, bg);
if (Emoticor::Get()->Config() == NULL)
Append(message, fg, bg, fg);
else
AddEmoticText(message, fg, bg);
Append("\n", fg, bg, fg);
ScrollToSelection();
}
@ -102,6 +104,7 @@ RenderView::PrepareTheme(Theme *fTheme)
fTheme->SetForeground(COL_OTHERNICK, 255, 0, 0);
fTheme->SetBackground(COL_OTHERNICK, bg);
if (Emoticor::Get()->Config() != NULL)
fTheme->SetTextRender(R_EMOTICON, &str);
fTheme->SetSoftLineIndent(5.0);