summaryrefslogtreecommitdiffstats
path: root/tools/designer/src/components/widgetbox/widgetboxtreewidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/designer/src/components/widgetbox/widgetboxtreewidget.cpp')
-rw-r--r--tools/designer/src/components/widgetbox/widgetboxtreewidget.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/designer/src/components/widgetbox/widgetboxtreewidget.cpp b/tools/designer/src/components/widgetbox/widgetboxtreewidget.cpp
index 99dfb9c..38e3501 100644
--- a/tools/designer/src/components/widgetbox/widgetboxtreewidget.cpp
+++ b/tools/designer/src/components/widgetbox/widgetboxtreewidget.cpp
@@ -664,6 +664,9 @@ WidgetBoxTreeWidget::CategoryList WidgetBoxTreeWidget::loadCustomCategoryList()
void WidgetBoxTreeWidget::adjustSubListSize(QTreeWidgetItem *cat_item)
{
QTreeWidgetItem *embedItem = cat_item->child(0);
+ if (embedItem == 0)
+ return;
+
WidgetBoxCategoryListView *list_widget = static_cast<WidgetBoxCategoryListView*>(itemWidget(embedItem, 0));
list_widget->setFixedWidth(header()->width());
list_widget->doItemsLayout();