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>
This commit is contained in:
parent
c243dd5643
commit
0310cef332
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user