diff --git a/thdb1d.cxx b/thdb1d.cxx index 50ef458b..ef07ba16 100644 --- a/thdb1d.cxx +++ b/thdb1d.cxx @@ -2393,8 +2393,8 @@ void thdb1d::close_loops() if (cleg->leg->data_type == TT_DATATYPE_NOSURVEY) { // ignore cleg->reverse - froms = &(this->station_vec[cleg->leg->from.id - 1]); - tos = &(this->station_vec[cleg->leg->to.id - 1]); + froms = &(this->station_vec[this->station_vec[cleg->leg->from.id - 1].uid - 1]); + tos = &(this->station_vec[this->station_vec[cleg->leg->to.id - 1].uid - 1]); // ak je no-survey, nastavi mu total statistiku cleg->leg->total_dx = tos->x - froms->x; cleg->leg->total_dy = tos->y - froms->y;