summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-11-05 07:27:23 (GMT)
committerFriedrich W. H. Kossebau <kossebau@kde.org>2016-11-05 16:49:33 (GMT)
commit10611fac637ce56c6b9e35eb5c0fb7a1937db39f (patch)
tree285213b47172c8030bf02db0b4fc64652b7a0696
parent433547895e131acd7e6b5b113343bd92660a1620 (diff)
Don't crash on (invalid, but still possible) empty ways
-rw-r--r--src/plugins/runner/osm/OsmRelation.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/runner/osm/OsmRelation.cpp b/src/plugins/runner/osm/OsmRelation.cpp
index cb13760..d2a879c 100644
--- a/src/plugins/runner/osm/OsmRelation.cpp
+++ b/src/plugins/runner/osm/OsmRelation.cpp
@@ -181,6 +181,9 @@ QList<GeoDataLinearRing> OsmRelation::rings(const QStringList &roles, const OsmW
foreach(qint64 wayId, roleMembers) {
GeoDataLinearRing ring;
OsmWay const & way = ways[wayId];
+ if (way.references().isEmpty()) {
+ continue;
+ }
if (way.references().first() != way.references().last()) {
unclosedWays.append(way);
continue;