summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormvglasow <michael -at- vonglasow.com>2020-12-19 14:49:58 +0200
committermvglasow <michael -at- vonglasow.com>2020-12-19 14:54:49 +0200
commitd235b2374756a3f34c067b3a1deb564511638052 (patch)
tree630780464d105289c221f6d32790174d12224214
parentbab784a39a5d26827fcc76661eee3738e4b46c0e (diff)
downloadnavit-d235b2374756a3f34c067b3a1deb564511638052.tar.gz
Fix:core:Prevent crash if destination is set before acquiring a location
Signed-off-by: mvglasow <michael -at- vonglasow.com>
-rw-r--r--navit/route.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/navit/route.c b/navit/route.c
index 858e51406..273e50aeb 100644
--- a/navit/route.c
+++ b/navit/route.c
@@ -1047,7 +1047,8 @@ struct map_selection * route_get_selection(struct route * this_) {
int i = 0;
GList *tmp;
- c[i++] = this_->pos->c;
+ if (this_->pos)
+ c[i++] = this_->pos->c;
tmp = this_->destinations;
while (tmp) {
struct route_info *dst = tmp->data;