diff --git a/src/map.c b/src/map.c index 2666214..6117d3e 100644 --- a/src/map.c +++ b/src/map.c @@ -214,10 +214,12 @@ static void map_render(double bx, double by, double w, double h) { glShadeModel(GL_FLAT); } // Selected planet. - sys = &systems_stack[map_selected]; - COLOUR(cRed); - gl_drawCircleInRect(x + sys->pos.x*map_zoom, y + sys->pos.y*map_zoom, - r+3., bx, by, w, h); + if(map_selected != -1) { + sys = &systems_stack[map_selected]; + COLOUR(cRed); + gl_drawCircleInRect(x + sys->pos.x*map_zoom, y + sys->pos.y*map_zoom, + r+3., bx, by, w, h); + } } // Map event handling. @@ -333,6 +335,7 @@ void map_clear(void) { void map_jump(void) { int j; + map_selected = -1; map_xpos = cur_system->pos.x; map_ypos = cur_system->pos.y;