Index: src_plugins/export_xy/xy.c =================================================================== --- src_plugins/export_xy/xy.c (revision 37041) +++ src_plugins/export_xy/xy.c (revision 37042) @@ -958,7 +958,7 @@ if ((options[HA_unit].lng < 0) || (options[HA_unit].lng >= rnd_get_n_units(1))) xy_unit = rnd_get_unit_struct("mil"); else - xy_unit = &rnd_units[options[HA_unit].lng]; + xy_unit = rnd_unit_get_idx(options[HA_unit].lng); tid = vts0_get(&fmt_ids, options[HA_format].lng, 0); if ((tid == NULL) || (*tid == NULL)) {