map_render_poi();
if(_show_tracks > 0)
map_render_paths();
+if (_home.valid)
+ map_draw_position_icon(&_home);
}
/**
-1, -1, GDK_RGB_DITHER_NONE, 0, 0);
}
+/**
+ * Draw an icon on given Position.
+ *
+ * XXX: don't hardcode as home.png !
+ */
void
map_draw_position_icon(Position *pos)
{
latlon2unit(pos->lat, pos->lon, x, y);
p=gdk_pixbuf_new_from_file(DATADIR "/pixmaps/mapper/home.png", NULL);
-map_draw_pixbuf(x,y,p);
-g_object_unref(p);
+if (p) {
+ map_draw_pixbuf(x,y,p);
+ g_object_unref(p);
+}
+
}
/**
if (_show_scale)
map_scale_draw(event);
-if (_home.valid)
- map_draw_position_icon(&_home);
-
return TRUE;
}