From 743a867df2f032be5318748dc55d6b88bbd0675f Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 21 Feb 2004 16:11:51 +0000 Subject: [PATCH] pointer exception when faction of travelthru-unit is null --- src/common/kernel/eressea.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common/kernel/eressea.c b/src/common/kernel/eressea.c index 84ac3e9cf..3ebf2d7aa 100644 --- a/src/common/kernel/eressea.c +++ b/src/common/kernel/eressea.c @@ -1952,8 +1952,10 @@ update_intervals(void) for (ru = a_find(r->attribs, &at_travelunit); ru; ru = ru->nexttype) { faction * f = ((unit*)ru->data.v)->faction; - if (f->first==NULL) f->first = r; - f->last = r->next; + if (f!=NULL) { + if (f->first==NULL) f->first = r; + f->last = r->next; + } } ulist = get_lighthouses(r);