Skip to content

Commit 6c98cca

Browse files
committed
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.
1 parent f15bd3c commit 6c98cca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/qt/sendcoinsdialog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ void SendCoinsDialog::clear()
260260
// Remove entries until only one left
261261
while(ui->entries->count())
262262
{
263-
delete ui->entries->takeAt(0)->widget();
263+
ui->entries->takeAt(0)->widget()->deleteLater();
264264
}
265265
addEntry();
266266

@@ -306,7 +306,7 @@ void SendCoinsDialog::updateTabsAndLabels()
306306

307307
void SendCoinsDialog::removeEntry(SendCoinsEntry* entry)
308308
{
309-
delete entry;
309+
entry->deleteLater();
310310

311311
// If the last entry was removed add an empty one
312312
if (!ui->entries->count())

0 commit comments

Comments
 (0)