From 0310cef332e8d9b034affc43e945f37c7ca4bee5 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Wed, 3 Dec 2014 11:22:24 +0100 Subject: 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 Reviewed-by: J-P Nurmi --- src/widgets/styles/qfusionstyle.cpp | 3 +++ 1 file changed, 3 insertions(+) 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()); -- cgit v1.2.3