summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpainterpath.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting/qpainterpath.cpp')
-rw-r--r--src/gui/painting/qpainterpath.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
index 7d6ea12..3a9afe1 100644
--- a/src/gui/painting/qpainterpath.cpp
+++ b/src/gui/painting/qpainterpath.cpp
@@ -1204,7 +1204,8 @@ void QPainterPath::connectPath(const QPainterPath &other)
int first = d->elements.size();
d->elements += other.d_func()->elements;
- d->elements[first].type = LineToElement;
+ if (first != 0)
+ d->elements[first].type = LineToElement;
// avoid duplicate points
if (first > 0 && QPointF(d->elements[first]) == QPointF(d->elements[first - 1])) {