pointer exception when faction of travelthru-unit is null

This commit is contained in:
Enno Rehling 2004-02-21 16:11:51 +00:00
parent 0486234db9
commit 743a867df2

View file

@ -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);