mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
QtUtils/ClearLayoutRecursively: Fix potential crash
Use QObject->deleteLater() instead of the delete operator to destroy child widgets of the layout. This prevents crashes caused by pending events trying to access the now-destroyed widget.
This commit is contained in:
@ -17,7 +17,7 @@ void ClearLayoutRecursively(QLayout* layout)
|
||||
if (child->widget())
|
||||
{
|
||||
layout->removeWidget(child->widget());
|
||||
delete child->widget();
|
||||
child->widget()->deleteLater();
|
||||
}
|
||||
else if (child->layout())
|
||||
{
|
||||
|
Reference in New Issue
Block a user