summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortinloaf <tinloaf@ffa7fe5e-494d-0410-b361-a75ebd5db220>2009-04-09 13:24:37 +0000
committertinloaf <tinloaf@ffa7fe5e-494d-0410-b361-a75ebd5db220>2009-04-09 13:24:37 +0000
commit7460cfe5411ea8ab418b4c6fcf32f6dbf2768935 (patch)
tree7b309fdfbad9d3c522ba2898e67a3f2ac0194d7c
parent3dace00dad25ceabb179ab729ec1fdda8d474f6b (diff)
downloadnavit-7460cfe5411ea8ab418b4c6fcf32f6dbf2768935.tar.gz
Fix:Core:Fix occasional segfault
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@2197 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r--navit/route.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/navit/route.c b/navit/route.c
index 599dda049..57e43a259 100644
--- a/navit/route.c
+++ b/navit/route.c
@@ -1541,6 +1541,11 @@ route_graph_get_segment(struct route_graph *graph, struct street_data *sd)
{
struct route_graph_point *start=route_graph_get_point(graph, &sd->c[0]);
struct route_graph_segment *s;
+
+ if (!start) {
+ return NULL;
+ }
+
s=start->start;
while (s) {
if (item_is_equal(sd->item, s->data.item))