From bf7e6d69bfab3ff8881a5a005584e4bc6d1d4e20 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Wed, 4 Dec 2013 08:17:57 +0100 Subject: [PATCH] qt: use deleteLater to remove send entries Use deleteLater() instead of delete, as it is not allowed to delete widgets directly in an event handler. Should solve the MacOSX random crashes on send with coincontrol. Rebased-From: 6c98cca9e47ddb9c786cd3f0445175c378515e0d --- src/qt/sendcoinsdialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index 76445c478..a56dc5341 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -227,7 +227,7 @@ void SendCoinsDialog::clear() // Remove entries until only one left while(ui->entries->count()) { - delete ui->entries->takeAt(0)->widget(); + ui->entries->takeAt(0)->widget()->deleteLater(); } addEntry(); @@ -286,7 +286,7 @@ void SendCoinsDialog::updateRemoveEnabled() void SendCoinsDialog::removeEntry(SendCoinsEntry* entry) { - delete entry; + entry->deleteLater(); updateRemoveEnabled(); }