summaryrefslogtreecommitdiff
path: root/src/svg/qsvgtinydocument.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/svg/qsvgtinydocument.cpp')
-rw-r--r--src/svg/qsvgtinydocument.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/svg/qsvgtinydocument.cpp b/src/svg/qsvgtinydocument.cpp
index b1bde78..12dd979 100644
--- a/src/svg/qsvgtinydocument.cpp
+++ b/src/svg/qsvgtinydocument.cpp
@@ -433,7 +433,7 @@ void QSvgTinyDocument::mapSourceToTarget(QPainter *p, const QRectF &targetRect,
if (source.isEmpty())
source = viewBox();
- if (source != target && !source.isEmpty()) {
+ if (source != target && !qFuzzyIsNull(source.width()) && !qFuzzyIsNull(source.height())) {
#if (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
if (m_implicitViewBox || !preserveAspectRatio()) {
// Code path used when no view box is set, or IgnoreAspectRatio requested