summaryrefslogtreecommitdiff
path: root/src/gui/widgets/setupitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/setupitem.cpp')
-rw-r--r--src/gui/widgets/setupitem.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp
index 18196a739..6bc0ef655 100644
--- a/src/gui/widgets/setupitem.cpp
+++ b/src/gui/widgets/setupitem.cpp
@@ -194,6 +194,8 @@ void SetupItem::externalUnloaded(const std::string &eventName A_UNUSED)
void SetupItem::fixFirstItemSize(Widget *const widget)
{
+ if (!widget)
+ return;
const int maxSize = mParent->getPreferredFirstItemSize();
if (widget->getWidth() < maxSize)
widget->setWidth(maxSize);