summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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));