1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-03-25 07:48: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) {
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<PainterPath> &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;