aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2013-12-04 08:17:57 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2013-12-05 09:16:48 +0100
commit8c3ba8be017791799dcfbc2126c24b0580fe48d5 (patch)
tree9ae303afc2fffe74834828f58f5769877db45060
parenta0a5b20156b7f0c7037bc7e11819ee86e579c47e (diff)
downloadbitcoin-8c3ba8be017791799dcfbc2126c24b0580fe48d5.tar.xz
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
-rw-r--r--src/qt/sendcoinsdialog.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index eb3ce48a6e..d64d70baa5 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -170,7 +170,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();
@@ -226,7 +226,7 @@ void SendCoinsDialog::updateRemoveEnabled()
void SendCoinsDialog::removeEntry(SendCoinsEntry* entry)
{
- delete entry;
+ entry->deleteLater();
updateRemoveEnabled();
}