CComponentsShapeSircle: fix segfault on init

This commit is contained in:
2012-09-01 23:35:17 +02:00
parent 2126bbda81
commit 4b1d9ca213
2 changed files with 28 additions and 3 deletions

View File

@@ -389,4 +389,16 @@ class CComponentsTitleBar : public CComponentsItemBox
};
class CComponentsForm : public CComponentsContainer
{
private:
public:
CComponentsForm();
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
};
#endif

View File

@@ -455,8 +455,7 @@ CComponentsShapeCircle::CComponentsShapeCircle( int x_pos, int y_pos, int diam,
//CComponents
x = x_pos;
y = y_pos;
width = d;
height = d;
//width = height = d = diam;
shadow = has_shadow;
shadow_w = SHADOW_OFFSET;
col_frame = color_frame;
@@ -467,7 +466,7 @@ CComponentsShapeCircle::CComponentsShapeCircle( int x_pos, int y_pos, int diam,
bgMode = CC_BGMODE_PERMANENT;
//CComponentsShapeCircle
d = diam;
width = height = d = diam;
//CComponentsContainer
corner_rad = d/2;
@@ -1314,3 +1313,17 @@ void CComponentsTitleBar::paint(bool do_save_bg)
paintItemBox(do_save_bg);
}
//-------------------------------------------------------------------------------------------------------
//sub class CComponentsForm from CComponentsItemBox
CComponentsForm::CComponentsForm()
{
//CComponentsContainer
initVarContainer();
}
void CComponentsForm::paint(bool do_save_bg)
{
paintInit(do_save_bg);
}