diff --git a/src/gui/iconutils.cpp b/src/gui/iconutils.cpp index ba9204e039261..22ce38f85aabb 100644 --- a/src/gui/iconutils.cpp +++ b/src/gui/iconutils.cpp @@ -108,7 +108,7 @@ QImage createSvgImageWithCustomColor(const QString &fileName, return {}; } - const auto sizeToUse = requestedSize.isValid() ? requestedSize : *originalSize; + const auto sizeToUse = requestedSize.isValid() || originalSize == nullptr ? requestedSize : *originalSize; // some icons are present in white or black only, so, we need to check both when needed const auto iconBaseColors = QStringList{QStringLiteral("black"), QStringLiteral("white")};