Helpbox: add missing check for null pointer

Origin commit data
------------------
Commit: b5d33f10e1
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-08-28 (Mon, 28 Aug 2017)
This commit is contained in:
2017-08-28 12:16:45 +02:00
parent 7991e183c5
commit 6112dbafcb

View File

@@ -106,7 +106,7 @@ void Helpbox::addLine(const std::string& icon, const std::string& text, const in
txt->setColorBody(COL_RED);
#endif
int lines = txt->getCTextBoxObject()->getLines();
txt_height = std::max(lines*font->getHeight(), h_line);
txt_height = std::max(font ? lines*font->getHeight() : 0, h_line);
txt->setHeight(txt_height);
line->addCCItem(txt);