Skip to content

Commit

Permalink
null pointe exception in allies-related code (E3)
Browse files Browse the repository at this point in the history
  • Loading branch information
ennorehling committed Jan 23, 2025
1 parent 54acb3c commit e256229
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/reports.c
Original file line number Diff line number Diff line change
Expand Up @@ -1162,11 +1162,13 @@ void get_addresses(report_context * ctx)
while (u != NULL) {
if (u->faction != ctx->f) {
faction *sf = visible_faction(ctx->f, u, get_otherfaction(u));
bool ballied = sf && sf != ctx->f && sf != lastf
&& !fval(u, UFL_ANON_FACTION) && cansee(ctx->f, r, u, stealthmod);
if (ballied || is_allied(ctx->f, sf)) {
add_seen_faction_i(&flist, sf);
lastf = sf;
if (sf) {
bool ballied = sf != ctx->f && sf != lastf
&& !fval(u, UFL_ANON_FACTION) && cansee(ctx->f, r, u, stealthmod);
if (ballied || is_allied(ctx->f, sf)) {
add_seen_faction_i(&flist, sf);
lastf = sf;
}
}
}
u = u->next;
Expand Down

0 comments on commit e256229

Please sign in to comment.