From 315c224f2416729e099dc50da67cb006b6843bf7 Mon Sep 17 00:00:00 2001 From: ZeldaZach Date: Thu, 16 Jan 2025 00:54:34 -0500 Subject: [PATCH] Fix crash on add/edit tags --- .../ui/widgets/general/layout_containers/flow_widget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cockatrice/src/client/ui/widgets/general/layout_containers/flow_widget.cpp b/cockatrice/src/client/ui/widgets/general/layout_containers/flow_widget.cpp index bc28af5c3..958cc98be 100644 --- a/cockatrice/src/client/ui/widgets/general/layout_containers/flow_widget.cpp +++ b/cockatrice/src/client/ui/widgets/general/layout_containers/flow_widget.cpp @@ -102,8 +102,8 @@ void FlowWidget::clearLayout() if (flowLayout != nullptr) { QLayoutItem *item; while ((item = flowLayout->takeAt(0)) != nullptr) { - delete item->widget(); // Delete the widget - delete item; // Delete the layout item + item->widget()->deleteLater(); // Delete the widget + delete item; // Delete the layout item } } else { if (scrollArea->horizontalScrollBarPolicy() != Qt::ScrollBarAlwaysOff &&