summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2012-02-06 22:35:08 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2012-02-06 22:35:08 +0100
commitf1eedb80a2efbf60cfc25182b72e3da07e0f1250 (patch)
tree99f7e24e93d2e77b5553988adacddbde1e60bbf8 /rbutil/rbutilqt
parent779c2f3eb1cdc5636c4f9252f5cf0fbe3a672462 (diff)
downloadrockbox-f1eedb80a2efbf60cfc25182b72e3da07e0f1250.tar.gz
rockbox-f1eedb80a2efbf60cfc25182b72e3da07e0f1250.zip
Don't try to save settings if none available.
Fixes a crash when leaving the encoder settings dialog with the Ok button but the dynamically loaded library missing, in which case no settings will be available. Change-Id: I889a0bbcde6bed2df658b5df57341edf6802daad
Diffstat (limited to 'rbutil/rbutilqt')
-rw-r--r--rbutil/rbutilqt/base/encoderlame.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/rbutil/rbutilqt/base/encoderlame.cpp b/rbutil/rbutilqt/base/encoderlame.cpp
index 75289481fb..8950d416c9 100644
--- a/rbutil/rbutilqt/base/encoderlame.cpp
+++ b/rbutil/rbutilqt/base/encoderlame.cpp
@@ -82,11 +82,12 @@ void EncoderLame::generateSettings()
void EncoderLame::saveSettings()
{
- // no user settings right now.
- RbSettings::setSubValue("lame", RbSettings::EncoderVolume,
- getSetting(VOLUME)->current().toDouble());
- RbSettings::setSubValue("lame", RbSettings::EncoderQuality,
- getSetting(QUALITY)->current().toDouble());
+ if(m_symbolsResolved) {
+ RbSettings::setSubValue("lame", RbSettings::EncoderVolume,
+ getSetting(VOLUME)->current().toDouble());
+ RbSettings::setSubValue("lame", RbSettings::EncoderQuality,
+ getSetting(QUALITY)->current().toDouble());
+ }
}
bool EncoderLame::start()