From 3ec36336c1acb6ba9e3f1a99451f5fa769a63589 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Tue, 29 Oct 2024 00:35:41 +0100 Subject: [PATCH] Added missing label text checks --- src/map/mapsforge/rastertile.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/map/mapsforge/rastertile.cpp b/src/map/mapsforge/rastertile.cpp index 4e6287b8..14d79a43 100644 --- a/src/map/mapsforge/rastertile.cpp +++ b/src/map/mapsforge/rastertile.cpp @@ -200,7 +200,7 @@ void RasterTile::processAreaLabels(const QVector &paths, QPointF pos = p.p->path->labelPos.isNull() ? centroid(p.p->pp) : ll2xy(p.p->path->labelPos); - if (p.ti && set.contains(*p.lbl)) + if (p.ti && p.lbl && set.contains(*p.lbl)) continue; PointItem *item = new PointItem(pos.toPoint(), p.lbl, font, img, color, @@ -208,7 +208,8 @@ void RasterTile::processAreaLabels(const QVector &paths, if (item->isValid() && _rect.contains(item->boundingRect().toRect()) && !item->collides(textItems)) { textItems.append(item); - set.insert(*p.lbl); + if (p.ti && p.lbl) + set.insert(*p.lbl); } else delete item; }