summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-09-03 15:05:08 (GMT)
committerDennis Nienhüser <nienhueser@kde.org>2016-09-03 15:05:15 (GMT)
commit247b9531954c6677f5467d42846a826c7c680f44 (patch)
treeddfe4752eef85d17d3dcb246afeb9bbfedac39e2
parent78bad5baab40eaea0f69c5cecce3ae1a75ff2aae (diff)
Fix potential use of uninitialized variable reducedLine
Would only happen when introducing another line string sub type though.
-rw-r--r--tools/osm-simplify/NodeReducer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/osm-simplify/NodeReducer.cpp b/tools/osm-simplify/NodeReducer.cpp
index 09c070c..0daa81b 100644
--- a/tools/osm-simplify/NodeReducer.cpp
+++ b/tools/osm-simplify/NodeReducer.cpp
@@ -79,6 +79,9 @@ GeoDataLineString* NodeReducer::reduce(GeoDataLineString* lineString){
return reducedLine;
}
reducedLine = new GeoDataLinearRing;
+ } else {
+ Q_ASSERT(false && "Unexpected GeoDataLineString subtype");
+ return;
}