forked from github/server
pointer exception when faction of travelthru-unit is null
This commit is contained in:
parent
0486234db9
commit
743a867df2
1 changed files with 4 additions and 2 deletions
|
@ -1952,9 +1952,11 @@ update_intervals(void)
|
||||||
|
|
||||||
for (ru = a_find(r->attribs, &at_travelunit); ru; ru = ru->nexttype) {
|
for (ru = a_find(r->attribs, &at_travelunit); ru; ru = ru->nexttype) {
|
||||||
faction * f = ((unit*)ru->data.v)->faction;
|
faction * f = ((unit*)ru->data.v)->faction;
|
||||||
|
if (f!=NULL) {
|
||||||
if (f->first==NULL) f->first = r;
|
if (f->first==NULL) f->first = r;
|
||||||
f->last = r->next;
|
f->last = r->next;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ulist = get_lighthouses(r);
|
ulist = get_lighthouses(r);
|
||||||
for (uptr=ulist;uptr!=NULL;uptr=uptr->next) {
|
for (uptr=ulist;uptr!=NULL;uptr=uptr->next) {
|
||||||
|
|
Loading…
Reference in a new issue