1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-03-28 09:18:26 +01:00

Fixed possible null pointer dereferences

This commit is contained in:
Martin Tůma 2025-03-19 08:11:49 +01:00
parent 381ab1516d
commit 7184c691d3

View File

@ -188,7 +188,7 @@ void RasterTile::processLineLabels(const QVector<PainterPath> &paths,
if (l.ti) { if (l.ti) {
limit = (l.ti->key() == ID_ELE || l.ti->key() == ID_REF limit = (l.ti->key() == ID_ELE || l.ti->key() == ID_REF
|| (!l.si && l.ti->shield())); || (!l.si && l.ti->shield()));
if (limit && set.contains(*l.lbl)) if (limit && l.lbl && set.contains(*l.lbl))
continue; continue;
} }
@ -214,7 +214,7 @@ void RasterTile::processLineLabels(const QVector<PainterPath> &paths,
color, hColor, rotate); color, hColor, rotate);
if (item->isValid() && !item->collides(textItems)) { if (item->isValid() && !item->collides(textItems)) {
textItems.append(item); textItems.append(item);
if (limit) if (limit && l.lbl)
set.insert(*l.lbl); set.insert(*l.lbl);
} else { } else {
delete item; delete item;