Ignore:
Timestamp:
01/11/13 14:25:36 (12 years ago)
Author:
Mathieu Morlighem
Message:

BUG: fixed crash, index undefined

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/Container/Observations.cpp

    r14238 r14239  
    148148                observation=dynamic_cast<Observation*>(this->GetObjectByOffset(indices[i]));
    149149                h2 = (observation->x-x_interp)*(observation->x-x_interp) + (observation->y-y_interp)*(observation->y-y_interp);
    150                 if(h2<hmin2){
     150                if(i==0){
    151151                        hmin2 = h2;
    152152                        index = i;
     153                }
     154                else{
     155                        if(h2<hmin2){
     156                                hmin2 = h2;
     157                                index = i;
     158                        }
    153159                }
    154160        } 
Note: See TracChangeset for help on using the changeset viewer.