1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-11 01:22:10 +01:00

ComboTabBar: Fix division by zero when icon pixmap is null

This commit is contained in:
David Rosca 2018-01-13 11:33:46 +01:00
parent 4f0c30c5c7
commit 54bad20590

View File

@ -1080,8 +1080,10 @@ QPixmap TabBarHelper::tabPixmap(int index) const
if (iconButton) { if (iconButton) {
const QPixmap pix = iconButton->grab(); const QPixmap pix = iconButton->grab();
tab.icon = pix; if (!pix.isNull()) {
tab.iconSize = pix.size() / pix.devicePixelRatioF(); tab.icon = pix;
tab.iconSize = pix.size() / pix.devicePixelRatioF();
}
} }
if (closeButton) { if (closeButton) {