X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/blobdiff_plain/2c580e640c7a19be5700be84b2429a5aea966a2f..f43cb41166abd4e2cb3688d0c486a2c074cc6fa5:/galaxies.c diff --git a/galaxies.c b/galaxies.c index b80515d..55efa94 100644 --- a/galaxies.c +++ b/galaxies.c @@ -365,7 +365,7 @@ static char *game_text_format(game_state *state) case s_tile: if (sp->flags & F_TILE_ASSOC) { space *dot = sp2dot(state, sp->x, sp->y); - if (dot->flags & F_DOT) + if (dot && dot->flags & F_DOT) *p++ = (dot->flags & F_DOT_BLACK) ? 'B' : 'W'; else *p++ = '?'; /* association with not-a-dot. */ @@ -1450,6 +1450,7 @@ generate: state = copy2; } } + sfree(posns); } #endif