summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpainterpath.cpp
diff options
context:
space:
mode:
authoraavit <qt-info@nokia.com>2011-01-26 12:15:40 (GMT)
committeraavit <qt-info@nokia.com>2011-01-26 12:15:40 (GMT)
commit6ef6adb7d6ba8408772c11c6190bc12960435c79 (patch)
treeb5a08eb955f7e18392ba26f3564042fe2e23ce26 /src/gui/painting/qpainterpath.cpp
parent57a4353c8e082dfc0f536a1e642e4a8df0e5b9c9 (diff)
parent9639f0ee4728036a8121674dc49e0c4338127075 (diff)
downloadQt-6ef6adb7d6ba8408772c11c6190bc12960435c79.zip
Qt-6ef6adb7d6ba8408772c11c6190bc12960435c79.tar.gz
Qt-6ef6adb7d6ba8408772c11c6190bc12960435c79.tar.bz2
Merge remote branch 'qt-fire-review/master'
Diffstat (limited to 'src/gui/painting/qpainterpath.cpp')
-rw-r--r--src/gui/painting/qpainterpath.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
index 9f49b2f..3d532d2 100644
--- a/src/gui/painting/qpainterpath.cpp
+++ b/src/gui/painting/qpainterpath.cpp
@@ -2923,9 +2923,12 @@ QPointF QPainterPath::pointAtPercent(qreal t) const
return QPointF();
}
- if (isEmpty())
+ if (!d_ptr || d_ptr->elements.size() == 0)
return QPointF();
+ if (d_ptr->elements.size() == 1)
+ return d_ptr->elements.at(0);
+
qreal totalLength = length();
qreal curLen = 0;
qreal bezierLen = 0;