diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2010-08-04 17:38:41 (GMT) |
---|---|---|
committer | Toby Tomkins <toby.tomkins@nokia.com> | 2010-08-06 03:37:18 (GMT) |
commit | 94b2f7580ad9f5460eccf51e999ad9b39c70aa9f (patch) | |
tree | f1e8da21134db2704998fb835203898daec34bfb | |
parent | e628b0808d874eb798e463f23387d00191d7068e (diff) | |
download | Qt-94b2f7580ad9f5460eccf51e999ad9b39c70aa9f.zip Qt-94b2f7580ad9f5460eccf51e999ad9b39c70aa9f.tar.gz Qt-94b2f7580ad9f5460eccf51e999ad9b39c70aa9f.tar.bz2 |
Fixed crash in concentric circles example
The problem is that the qt_arcs... function will return point_count = 0
when the input rectangle is empty which it is in this case. Because we
previously passed 13 there, were passing random memory to downwards in
the pipeline, which caused problems.
Task: http://bugreports.qt.nokia.com/browse/QTBUG-12516
Reviewed-by: mariusso
(cherry picked from commit 08d09a78d3faf8b211e78cb63285c35c5544b5fc)
-rw-r--r-- | src/gui/painting/qpaintengineex.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp index e0746fb..881bd6e 100644 --- a/src/gui/painting/qpaintengineex.cpp +++ b/src/gui/painting/qpaintengineex.cpp @@ -831,7 +831,7 @@ void QPaintEngineEx::drawEllipse(const QRectF &r) int point_count = 0; x.points[0] = qt_curves_for_arc(r, 0, -360, x.points + 1, &point_count); - QVectorPath vp((qreal *) pts, 13, qpaintengineex_ellipse_types, QVectorPath::EllipseHint); + QVectorPath vp((qreal *) pts, point_count, qpaintengineex_ellipse_types, QVectorPath::EllipseHint); draw(vp); } |