diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-12-04 08:17:57 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-12-04 08:17:57 +0100 |
commit | 6c98cca9e47ddb9c786cd3f0445175c378515e0d (patch) | |
tree | e7e66512e89afb5fc6c58f5db42e85ea9c5f4d59 /src/qt/sendcoinsdialog.cpp | |
parent | f15bd3c96f0c6806a5140120a7c3442e08ae3812 (diff) |
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.
Diffstat (limited to 'src/qt/sendcoinsdialog.cpp')
-rw-r--r-- | src/qt/sendcoinsdialog.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index 73cfa27c83..0a4e80811f 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -260,7 +260,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(); @@ -306,7 +306,7 @@ void SendCoinsDialog::updateTabsAndLabels() void SendCoinsDialog::removeEntry(SendCoinsEntry* entry) { - delete entry; + entry->deleteLater(); // If the last entry was removed add an empty one if (!ui->entries->count()) |