diff options
author | aavit <qt-info@nokia.com> | 2011-01-26 12:15:40 (GMT) |
---|---|---|
committer | aavit <qt-info@nokia.com> | 2011-01-26 12:15:40 (GMT) |
commit | 6ef6adb7d6ba8408772c11c6190bc12960435c79 (patch) | |
tree | b5a08eb955f7e18392ba26f3564042fe2e23ce26 /src/gui/painting/qpainterpath.cpp | |
parent | 57a4353c8e082dfc0f536a1e642e4a8df0e5b9c9 (diff) | |
parent | 9639f0ee4728036a8121674dc49e0c4338127075 (diff) | |
download | Qt-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.cpp | 5 |
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; |