diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2010-08-04 17:38:41 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@nokia.com> | 2010-08-04 17:44:19 (GMT) |
commit | 08d09a78d3faf8b211e78cb63285c35c5544b5fc (patch) | |
tree | 34d2b812415c1e69563599947430aef95d706e30 | |
parent | 26218170746d36b866ae80c8f4418f5592121eb6 (diff) | |
download | Qt-08d09a78d3faf8b211e78cb63285c35c5544b5fc.zip Qt-08d09a78d3faf8b211e78cb63285c35c5544b5fc.tar.gz Qt-08d09a78d3faf8b211e78cb63285c35c5544b5fc.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
-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); } |