1
mirror of https://invent.kde.org/network/falkon.git synced 2024-09-21 09:42:10 +02: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) {
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) {