summaryrefslogtreecommitdiffstats
path: root/src/openvg
diff options
context:
space:
mode:
Diffstat (limited to 'src/openvg')
-rw-r--r--src/openvg/qpaintengine_vg.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index 4b22d5e..b8c60a4 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -1627,7 +1627,10 @@ void QVGPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op)
// Try converting the path into a QRegion that tightly follows
// the outline of the path we want to clip with.
- QRegion region(path.convertToPainterPath().toFillPolygon(QTransform()).toPolygon());
+ QRegion region;
+ if (!path.isEmpty())
+ region = QRegion(path.convertToPainterPath().toFillPolygon(QTransform()).toPolygon());
+
switch (op) {
case Qt::NoClip:
{