Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 0d92cc2b authored by Laurent Montel's avatar Laurent Montel 😁

Check is map is empty

parent 5b8e4947
......@@ -84,6 +84,11 @@ bool PimSettingsBackupRestore::openArchive(const QString &filename, bool readWri
void PimSettingsBackupRestore::backupStart(const QString &filename)
{
if (mStored.isEmpty()) {
Q_EMIT jobFailed();
deleteLater();
return;
}
if (!openArchive(filename, true)) {
Q_EMIT jobFailed();
deleteLater();
......@@ -255,6 +260,11 @@ bool PimSettingsBackupRestore::continueToRestore()
bool PimSettingsBackupRestore::restoreStart(const QString &filename)
{
if (mStored.isEmpty()) {
Q_EMIT jobFailed();
deleteLater();
return false;
}
if (!openArchive(filename, false)) {
Q_EMIT jobFailed();
deleteLater();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment