summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/widgets/qtoolbararealayout.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/widgets/qtoolbararealayout.cpp b/src/gui/widgets/qtoolbararealayout.cpp
index cd5c131..de11625 100644
--- a/src/gui/widgets/qtoolbararealayout.cpp
+++ b/src/gui/widgets/qtoolbararealayout.cpp
@@ -776,7 +776,8 @@ void QToolBarAreaLayout::deleteAllLayoutItems()
for (int k = 0; k < line.toolBarItems.count(); ++k) {
QToolBarAreaLayoutItem &item = line.toolBarItems[k];
- delete item.widgetItem;
+ if (!item.gap)
+ delete item.widgetItem;
item.widgetItem = 0;
}
}