From 7184c691d300c3c08593cb9ae96919aa02477649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Wed, 19 Mar 2025 08:11:49 +0100 Subject: [PATCH] Fixed possible null pointer dereferences --- src/map/mapsforge/rastertile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/map/mapsforge/rastertile.cpp b/src/map/mapsforge/rastertile.cpp index fb72e8c4..bfe292a1 100644 --- a/src/map/mapsforge/rastertile.cpp +++ b/src/map/mapsforge/rastertile.cpp @@ -188,7 +188,7 @@ void RasterTile::processLineLabels(const QVector &paths, if (l.ti) { limit = (l.ti->key() == ID_ELE || l.ti->key() == ID_REF || (!l.si && l.ti->shield())); - if (limit && set.contains(*l.lbl)) + if (limit && l.lbl && set.contains(*l.lbl)) continue; } @@ -214,7 +214,7 @@ void RasterTile::processLineLabels(const QVector &paths, color, hColor, rotate); if (item->isValid() && !item->collides(textItems)) { textItems.append(item); - if (limit) + if (limit && l.lbl) set.insert(*l.lbl); } else { delete item;