diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-05-28 21:36:20 +0200 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-05-28 21:36:20 +0200 |
commit | 285cdd856240475e46ccb658a0c36380554aa4eb (patch) | |
tree | af9933adcda80e4bbd4c69dca2861913a9151ea3 | |
parent | f30e78a60afae97b8bbcb7b1bd4bead5a3744ce4 (diff) |
don't access m if it's NULL
-rw-r--r-- | src/Hill.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Hill.cxx b/src/Hill.cxx index 3b1c6bd..b059897 100644 --- a/src/Hill.cxx +++ b/src/Hill.cxx @@ -132,13 +132,13 @@ void Hills::mark_duplicates(double dist) { sort(SORT_PHI); - for(i=0; i<get_num();i++) { + for(i = 0; i < get_num(); i++) { m = get(i); - if (m->flags & Hill::TRACK_POINT) - continue; - if (m) { + if (m->flags & Hill::TRACK_POINT) + continue; + j = i + 1; n = get(j); while (n && fabs(n->phi - m->phi) <= dist) { |