diff --git a/racing.cpp b/racing.cpp index 218d4429..5263b811 100644 --- a/racing.cpp +++ b/racing.cpp @@ -1294,6 +1294,7 @@ EX int get_percentage(int i) { void draw_ghost_state(ghost& ghost) { auto& p = get_ghostmoment(ghost); + if(p.where_id >= isize(rti)) return; cell *w = rti[p.where_id].c; ld result = ghost_finished(ghost) ? 100 : get_percentage(w); draw_ghost_at(ghost, w, racerel(result), p);