From 24334c206e0611c2a8c5ef7265b96465c9459939 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Mon, 14 Sep 2009 11:15:51 +0200 Subject: Fixed crash in gl when stroking with a Qt::NoBrush pen Reviewed-by: Samuel --- src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index e32bbbd..adde89c 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1052,7 +1052,9 @@ void QGL2PaintEngineEx::stroke(const QVectorPath &path, const QPen &pen) { Q_D(QGL2PaintEngineEx); - if (pen.style() == Qt::NoPen) + Qt::PenStyle penStyle = qpen_style(pen); + const QBrush &penBrush = qpen_brush(pen); + if (penStyle == Qt::NoPen || qbrush_style(penBrush) == Qt::NoBrush) return; ensureActive(); -- cgit v0.12