The immediate fix is to make this block (lines 110ff. in scripts/pathing.lua):
state.pointer = rendering.draw_circle({
color = {r = 0.7, g = 0.7, b = 0.3 },
radius = 0.25,
filled = true,
target = state.goal,
surface = vehicle.surface,
forces = { vehicle.force },
draw_on_ground = true,
})
conditional:
if state.goal then
state.pointer = rendering.draw_circle({
...
})
end
This makes sure that the position state.goal actually exists before trying to render the dot. But the really interesting question is how/why state.goal was removed in your case. A saved game may help to find the reason and fix the crash at its source. :-)