From b59112f74ed9f27a9e7b2e9a00d68ebe8fd87b3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sun, 1 Dec 2019 13:33:00 +0100 Subject: [PATCH] Added missing error handling --- src/map/IMG/textpathitem.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/map/IMG/textpathitem.cpp b/src/map/IMG/textpathitem.cpp index 24485d5e..504b45dd 100644 --- a/src/map/IMG/textpathitem.cpp +++ b/src/map/IMG/textpathitem.cpp @@ -100,6 +100,8 @@ static QPainterPath textPath(const QPolygonF &path, qreal textWidth, qreal charWidth, const QRectF &tileRect) { QList lines(lineString(path, tileRect)); + if (lines.isEmpty()) + return QPainterPath(); qreal length = 0; qreal angle = lines.first().angle(); int last = 0;