CComponentsInfoBox: move statement for check of image name

Ensure empty pic object otherwise it can be retained on exit
of paintPicture(), if an instance of Infobox already exists.

supplement to e575e91329


Origin commit data
------------------
Branch: ni/coolstream
Commit: d7ce847471
Author: Thilo Graf <dbt@novatux.de>
Date: 2013-04-06 (Sat, 06 Apr 2013)



------------------
This commit was generated by Migit
This commit is contained in:
2013-04-06 08:49:16 +02:00
parent 307a8675b6
commit e32f62315e

View File

@@ -91,12 +91,16 @@ void CComponentsInfoBox::initVarInfobox()
void CComponentsInfoBox::paintPicture()
{
if (pic_name == "")
return;
//init and set icon paint position
//ensure empty pic object
if (pic)
delete pic;
pic = NULL;
//exit if no image definied
if (pic_name == "")
return;
//init pic object and set icon paint position
pic = new CComponentsPicture(x+fr_thickness+x_offset, y+fr_thickness/*+y_offset*/, 0, 0, "");
//define icon