Merge pull request #12947 from Dentomologist/qtutils_clearlayoutrecursively_fix_potential_crash

QtUtils/ClearLayoutRecursively: Fix potential crash
This commit is contained in:
Tilka 2024-08-07 03:29:52 +01:00 committed by GitHub
commit 9ae560d8a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ void ClearLayoutRecursively(QLayout* layout)
if (child->widget()) if (child->widget())
{ {
layout->removeWidget(child->widget()); layout->removeWidget(child->widget());
delete child->widget(); child->widget()->deleteLater();
} }
else if (child->layout()) else if (child->layout())
{ {