forked from github/server
Fix some crashes that happened while debugging an old data file.
This commit is contained in:
parent
838155179f
commit
997d1ffd4b
|
@ -1119,6 +1119,10 @@ static ally **addally(const faction * f, ally ** sfp, int aid, int state)
|
|||
if (state == 0)
|
||||
return sfp;
|
||||
|
||||
while (*sfp) {
|
||||
sfp = &(*sfp)->next;
|
||||
}
|
||||
|
||||
sf = ally_add(sfp, af);
|
||||
if (!sf->faction) {
|
||||
variant id;
|
||||
|
@ -1127,9 +1131,6 @@ static ally **addally(const faction * f, ally ** sfp, int aid, int state)
|
|||
}
|
||||
sf->status = state & HELP_ALL;
|
||||
|
||||
while (*sfp)
|
||||
sfp = &(*sfp)->next;
|
||||
*sfp = sf;
|
||||
return &sf->next;
|
||||
}
|
||||
|
||||
|
|
|
@ -1183,7 +1183,7 @@ link_seen(seen_region * seehash[], const region * first, const region * last)
|
|||
}
|
||||
r = r->next;
|
||||
}
|
||||
sr->next = 0;
|
||||
if (sr) sr->next = 0;
|
||||
}
|
||||
|
||||
seen_region *find_seen(struct seen_region *seehash[], const region * r)
|
||||
|
|
Loading…
Reference in New Issue