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.
This commit is contained in:
parent
f15bd3c96f
commit
6c98cca9e4
@ -260,7 +260,7 @@ void SendCoinsDialog::clear()
|
|||||||
// Remove entries until only one left
|
// Remove entries until only one left
|
||||||
while(ui->entries->count())
|
while(ui->entries->count())
|
||||||
{
|
{
|
||||||
delete ui->entries->takeAt(0)->widget();
|
ui->entries->takeAt(0)->widget()->deleteLater();
|
||||||
}
|
}
|
||||||
addEntry();
|
addEntry();
|
||||||
|
|
||||||
@ -306,7 +306,7 @@ void SendCoinsDialog::updateTabsAndLabels()
|
|||||||
|
|
||||||
void SendCoinsDialog::removeEntry(SendCoinsEntry* entry)
|
void SendCoinsDialog::removeEntry(SendCoinsEntry* entry)
|
||||||
{
|
{
|
||||||
delete entry;
|
entry->deleteLater();
|
||||||
|
|
||||||
// If the last entry was removed add an empty one
|
// If the last entry was removed add an empty one
|
||||||
if (!ui->entries->count())
|
if (!ui->entries->count())
|
||||||
|
Loading…
Reference in New Issue
Block a user