Sanity check

Not sure this can really happen in real life (happens because I was playing with
    the code and end up having "=true" line in Clementine.conf) but FWIW, better
to check those values they come from possibly corrupted files/preferences.
This commit is contained in:
Arnaud Bienner 2014-12-27 01:23:26 +01:00
parent c5b6f7b531
commit 9bbb534fa1
1 changed files with 4 additions and 1 deletions

View File

@ -347,8 +347,11 @@ void InternetModel::UpdateServices() {
QStringList keys = s.childKeys();
for (QString service_name : keys) {
for (const QString& service_name : keys) {
InternetService* internet_service = ServiceByName(service_name);
if (internet_service == nullptr) {
continue;
}
bool setting_val = s.value(service_name).toBool();
// Only update if values are different