Commit 1e7aa4b3 authored by Laurent Montel's avatar Laurent Montel 😁

Fix potential crash

parent 75a8e2b5
......@@ -245,7 +245,7 @@ bool Util::saveContents(QWidget *parent, const KMime::Content::List &contents, Q
fileExists = job->exec();
}
if (fileExists) {
PimCommon::RenameFileDialog *dlg = new PimCommon::RenameFileDialog(curUrl,
QPointer<PimCommon::RenameFileDialog> dlg = new PimCommon::RenameFileDialog(curUrl,
multiple,
parent);
result
......@@ -255,8 +255,10 @@ bool Util::saveContents(QWidget *parent, const KMime::Content::List &contents, Q
delete dlg;
continue;
} else if (result == PimCommon::RenameFileDialog::RENAMEFILE_RENAME) {
if (dlg) {
curUrl = dlg->newName();
}
}
delete dlg;
}
}
......
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