Fix crash on startup
This commit is contained in:
parent
cbf7e7cdbc
commit
6beba35d0f
1 changed files with 2 additions and 2 deletions
|
@ -82,10 +82,10 @@ Battery::Battery(Settings* newSettings, QObject* parent) : QObject(parent)
|
|||
chargingEnabledFile->close();
|
||||
}
|
||||
else {
|
||||
delete chargingEnabledFile;
|
||||
chargingEnabledFile = Q_NULLPTR;
|
||||
qWarning() << "Charger control file" << chargingEnabledFile->fileName() << "is not writable";
|
||||
qWarning() << "Charger control feature disabled";
|
||||
delete chargingEnabledFile;
|
||||
chargingEnabledFile = Q_NULLPTR;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue