summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2008-02-03 11:49:29 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2008-02-03 11:49:29 +0000
commitc5b8a7b45dc4c1f0c195d00280eaa9bee7cb4b80 (patch)
tree91d00898e1050efdc37ba4a5004ac0e9733ef2ab
parent5a38f3e9de56c780652a6a74c367987cbf8993f7 (diff)
downloadrockbox-c5b8a7b45dc4c1f0c195d00280eaa9bee7cb4b80.tar.gz
rockbox-c5b8a7b45dc4c1f0c195d00280eaa9bee7cb4b80.zip
Redo my previous segfault fix in a better way.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16205 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--rbutil/rbutilqt/createvoicewindow.cpp8
-rw-r--r--rbutil/rbutilqt/installtalkwindow.cpp7
2 files changed, 5 insertions, 10 deletions
diff --git a/rbutil/rbutilqt/createvoicewindow.cpp b/rbutil/rbutilqt/createvoicewindow.cpp
index 8e08ba3f28..cdf2c41822 100644
--- a/rbutil/rbutilqt/createvoicewindow.cpp
+++ b/rbutil/rbutilqt/createvoicewindow.cpp
@@ -45,7 +45,7 @@ void CreateVoiceWindow::accept()
logger->show();
connect(logger,SIGNAL(closed()),this,SLOT(close()));
- QString lang = ui.comboLanguage->currentText();
+ QString lang = ui.comboLanguage->currentText();
int wvThreshold = ui.wavtrimthreshold->value();
//safe selected language
@@ -88,10 +88,8 @@ void CreateVoiceWindow::setSettings(RbSettings* sett)
QString encoder = settings->curEncoder();
// only proceed if encoder setting is set
- if(!encoder.isEmpty()) {
- // FIXME: getEncoder CAN return a NULL pointer. Additional error
- // checking is required or getEncoder should use the default engine
- EncBase* enc = getEncoder(encoder);
+ EncBase* enc = getEncoder(encoder);
+ if(enc != NULL) {
enc->setCfg(settings);
if(enc->configOk())
ui.labelEncProfile->setText(tr("Selected Encoder: <b>%1</b>").arg(encoder));
diff --git a/rbutil/rbutilqt/installtalkwindow.cpp b/rbutil/rbutilqt/installtalkwindow.cpp
index dfe2a84c19..2fa69b7195 100644
--- a/rbutil/rbutilqt/installtalkwindow.cpp
+++ b/rbutil/rbutilqt/installtalkwindow.cpp
@@ -119,11 +119,8 @@ void InstallTalkWindow::setSettings(RbSettings* sett)
ui.labelTtsProfile->setText(tr("Selected TTS Engine: <b>%1</b>").arg("Invalid TTS configuration!"));
QString encoder = settings->curEncoder();
- // only proceed if encoder setting is set
- if(!encoder.isEmpty()) {
- // FIXME: getEncoder CAN return a NULL pointer. Additional error
- // checking is required or getEncoder should use the default engine
- EncBase* enc = getEncoder(encoder);
+ EncBase* enc = getEncoder(encoder);
+ if(enc != NULL) {
enc->setCfg(settings);
if(enc->configOk())
ui.labelEncProfile->setText(tr("Selected Encoder: <b>%1</b>").arg(encoder));