summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2014-12-03 11:22:24 +0100
committerUlf Hermann <ulf.hermann@theqtcompany.com>2015-01-19 10:53:10 +0100
commit0310cef332e8d9b034affc43e945f37c7ca4bee5 (patch)
tree42c056c7dc7d00c09772e8f7d2ac155de0c6adec /src
parentc243dd564397fedbe3d2221da72d7ce207eebade (diff)
FusionStyle: Don't try to draw null pixmaps
We have the same check for null already for PE_IndicatorHeaderArrow which actually uses the same pixmap. If the file is not found the pixmap will be null and the code dividing by its width or height will thrown an arithmetic exception. Task-number: QTBUG-43067 Change-Id: I13a5ee9f21f4189b7bbcfd57a6f5b52113de834d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/styles/qfusionstyle.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp
index ed7b4ab3b6..cf2f3ea26b 100644
--- a/src/widgets/styles/qfusionstyle.cpp
+++ b/src/widgets/styles/qfusionstyle.cpp
@@ -514,6 +514,9 @@ void QFusionStyle::drawPrimitive(PrimitiveElement elem,
break;
}
arrow = colorizedImage(QLatin1String(":/qt-project.org/styles/commonstyle/images/fusion_arrow.png"), arrowColor, rotation);
+ if (arrow.isNull())
+ break;
+
QRect rect = option->rect;
QRect arrowRect;
int imageMax = qMin(arrow.height(), arrow.width());