mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 23:13:13 +02:00
cc_frm_button.cpp: dont create cc_btn_icon_obj with empty cc_btn_icon, avoid segfault with doble delete - delete cc_btn_icon_obj and CComponentsForm::clear()
This commit is contained in:
@@ -157,13 +157,17 @@ void CComponentsButton::initIcon()
|
|||||||
int y_icon = height/2 - h_icon/2;
|
int y_icon = height/2 - h_icon/2;
|
||||||
|
|
||||||
//init icon object
|
//init icon object
|
||||||
if (cc_btn_icon_obj == NULL){
|
if(!cc_btn_icon.empty())
|
||||||
cc_btn_icon_obj = new CComponentsPicture(fr_thickness, y_icon, cc_btn_icon, this);
|
{
|
||||||
cc_btn_icon_obj->SetTransparent(CFrameBuffer::TM_BLACK);
|
if (cc_btn_icon_obj == NULL)
|
||||||
cc_btn_icon_obj->doPaintBg(false);
|
{
|
||||||
|
cc_btn_icon_obj = new CComponentsPicture(fr_thickness, y_icon, cc_btn_icon, this);
|
||||||
|
cc_btn_icon_obj->SetTransparent(CFrameBuffer::TM_BLACK);
|
||||||
|
cc_btn_icon_obj->doPaintBg(false);
|
||||||
|
}
|
||||||
|
cc_btn_icon_obj->setHeight(h_icon, true);
|
||||||
|
cc_btn_icon_obj->setPicture(cc_btn_icon);
|
||||||
}
|
}
|
||||||
cc_btn_icon_obj->setHeight(h_icon, true);
|
|
||||||
cc_btn_icon_obj->setPicture(cc_btn_icon);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsButton::initCaption()
|
void CComponentsButton::initCaption()
|
||||||
|
Reference in New Issue
Block a user