Commit 4ed67e11 authored by David Faure's avatar David Faure

Fix crash when clicking on "try again".

==6895== Invalid read of size 8
==6895==    at 0x9294220: KPasswordDialog::password() const (kpassworddialog.cpp:201)
==6895==    by 0x42AFDD: SettingsPasswordRequester::requestManualAuth(bool*) (settingspasswordrequester.cpp:174)
==6895==  Address 0x2f34cc50 is 48 bytes inside a block of size 56 free'd
==6895==    at 0x4C2A69D: operator delete(void*) (vg_replace_malloc.c:576)
==6895==    by 0x929342D: KPasswordDialog::~KPasswordDialog() (kpassworddialog.cpp:80)
==6895==    by 0xA9C83E2: QDialog::exec() (qdialog.cpp:540)
==6895==    by 0x42AF7F: SettingsPasswordRequester::requestManualAuth(bool*) (settingspasswordrequester.cpp:172)

parent 6a401992
......@@ -164,11 +164,10 @@ void SettingsPasswordRequester::onPasswordRequestCompleted(const QString &passwo
QString SettingsPasswordRequester::requestManualAuth(bool* userRejected)
KPasswordDialog *dlg = new KPasswordDialog(nullptr);
QScopedPointer<KPasswordDialog> dlg(new KPasswordDialog(nullptr));
dlg->setPrompt(i18n("Please enter password for user '%1' on IMAP server '%2'.",
m_resource->settings()->userName(), m_resource->settings()->imapServer()));
if (dlg->exec()) {
if (userRejected) *userRejected = false;
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