CComponentsExtTextForm: remove check for empty strings

This check causes possible segfault and check is already in ccx_text_obj.


Origin commit data
------------------
Commit: 05ce023278
Author: Thilo Graf <dbt@novatux.de>
Date: 2013-11-10 (Sun, 10 Nov 2013)
This commit is contained in:
2013-11-10 21:45:02 +01:00
parent 2a5f6dd9c5
commit 346feb80d4

View File

@@ -111,14 +111,6 @@ void CComponentsExtTextForm::initVarExtTextForm(const int x_pos, const int y_pos
void CComponentsExtTextForm::initLabel() void CComponentsExtTextForm::initLabel()
{ {
//init label object only if text available
if (ccx_label_text.empty()) {
if (ccx_label_obj)
delete ccx_label_obj;
ccx_label_obj = NULL;
return;
}
//initialize label object //initialize label object
if (ccx_label_obj == NULL){ if (ccx_label_obj == NULL){
ccx_label_obj = new CComponentsLabel(); ccx_label_obj = new CComponentsLabel();
@@ -141,14 +133,6 @@ void CComponentsExtTextForm::initLabel()
void CComponentsExtTextForm::initText() void CComponentsExtTextForm::initText()
{ {
//init text object only if text available
if (ccx_text.empty()) {
if (ccx_text_obj)
delete ccx_text_obj;
ccx_text_obj = NULL;
return;
}
//initialize text object //initialize text object
if (ccx_text_obj == NULL){ if (ccx_text_obj == NULL){
ccx_text_obj = new CComponentsLabel(); ccx_text_obj = new CComponentsLabel();