summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2010-11-17 12:01:38 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2010-11-17 12:14:27 (GMT)
commit6ad33e1ff7618704fd41549780d0d0c93778364e (patch)
tree14dafc290f7d3b98e175d20c7db8b1ad64d8dd62 /src/opengl/gl2paintengineex
parentd68b5355b36e31dbeec2474d8469646358e0cd87 (diff)
downloadQt-6ad33e1ff7618704fd41549780d0d0c93778364e.zip
Qt-6ad33e1ff7618704fd41549780d0d0c93778364e.tar.gz
Qt-6ad33e1ff7618704fd41549780d0d0c93778364e.tar.bz2
Prevent crash in GL 2 engine when stroking null rectangle.
Task-number: QTBUG-15320 Reviewed-by: Kim
Diffstat (limited to 'src/opengl/gl2paintengineex')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 73915cb..37552ac 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -1212,6 +1212,9 @@ void QGL2PaintEngineExPrivate::stroke(const QVectorPath &path, const QPen &pen)
stroker.process(dashStroke, pen, clip);
}
+ if (!stroker.vertexCount())
+ return;
+
if (opaque) {
prepareForDraw(opaque);
setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, stroker.vertices());