1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 13:41:16 +01:00

Added missing error handling

This commit is contained in:
Martin Tůma 2019-12-01 13:33:00 +01:00
parent 17b3602fda
commit b59112f74e

View File

@ -100,6 +100,8 @@ static QPainterPath textPath(const QPolygonF &path, qreal textWidth,
qreal charWidth, const QRectF &tileRect) qreal charWidth, const QRectF &tileRect)
{ {
QList<QLineF> lines(lineString(path, tileRect)); QList<QLineF> lines(lineString(path, tileRect));
if (lines.isEmpty())
return QPainterPath();
qreal length = 0; qreal length = 0;
qreal angle = lines.first().angle(); qreal angle = lines.first().angle();
int last = 0; int last = 0;