From e575e913291d8506cc449b33e046dc2574ca61d8 Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Thu, 4 Apr 2013 17:05:32 +0200 Subject: [PATCH] CComponentsInfoBox: CComponentsPicture not create when no image to draw Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/095c0e1b045898cbb7abdf363227e0f0690cf1a6 Author: Michael Liebmann Date: 2013-04-04 (Thu, 04 Apr 2013) Origin message was: ------------------ * CComponentsInfoBox: CComponentsPicture not create when no image to draw ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc_item_infobox.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/components/cc_item_infobox.cpp b/src/gui/components/cc_item_infobox.cpp index 37c0d94ad..b4954a6c8 100644 --- a/src/gui/components/cc_item_infobox.cpp +++ b/src/gui/components/cc_item_infobox.cpp @@ -91,6 +91,9 @@ void CComponentsInfoBox::initVarInfobox() void CComponentsInfoBox::paintPicture() { + if (pic_name == "") + return; + //init and set icon paint position if (pic) delete pic; @@ -115,7 +118,7 @@ void CComponentsInfoBox::paint(bool do_save_bg) x_text = x+fr_thickness+x_offset; //set text to the left border if picture is not painted - if (pic->isPicPainted()){ + if ((pic) && (pic->isPicPainted())){ int pic_w = pic->getWidth(); x_text += pic_w+x_offset; }