diff --git a/src/lib/tabwidget/combotabbar.cpp b/src/lib/tabwidget/combotabbar.cpp index 0dbb285ef..efc56a526 100644 --- a/src/lib/tabwidget/combotabbar.cpp +++ b/src/lib/tabwidget/combotabbar.cpp @@ -1080,8 +1080,10 @@ QPixmap TabBarHelper::tabPixmap(int index) const if (iconButton) { const QPixmap pix = iconButton->grab(); - tab.icon = pix; - tab.iconSize = pix.size() / pix.devicePixelRatioF(); + if (!pix.isNull()) { + tab.icon = pix; + tab.iconSize = pix.size() / pix.devicePixelRatioF(); + } } if (closeButton) {