From b5d33f10e1d80a85273190d99a892d89e0d0e01f Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 28 Aug 2017 12:16:45 +0200 Subject: [PATCH] Helpbox: add missing check for null pointer --- src/gui/widget/helpbox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widget/helpbox.cpp b/src/gui/widget/helpbox.cpp index d4fd87b76..66a3835ed 100644 --- a/src/gui/widget/helpbox.cpp +++ b/src/gui/widget/helpbox.cpp @@ -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);