summaryrefslogtreecommitdiff
path: root/navit/route.c
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:49:58 +0200
commit764c7b920fd38c0261a4fe336175db2c3c2ef750 (patch)
treed2a5c5b0bbf714d084a3b27cd3e466a09453cc24 /navit/route.c
parentb70baf2cb77bb17e7646fb8ad85d25ecc31e427d (diff)
downloadnavit-764c7b920fd38c0261a4fe336175db2c3c2ef750.tar.gz
Fix:core:Prevent crash if destination is set before acquiring a location
Signed-off-by: mvglasow <michael -at- vonglasow.com>
Diffstat (limited to 'navit/route.c')
-rw-r--r--navit/route.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/navit/route.c b/navit/route.c
index fa62ce2d7..bc6e6815b 100644
--- a/navit/route.c
+++ b/navit/route.c
@@ -1058,7 +1058,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;