Changeset 6f9d14 for molecuilder


Ignore:
Timestamp:
Oct 14, 2009, 11:01:47 AM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
c419f2
Parents:
57cfb7
Message:

Check whether map is not NULL in GetMinMax() and BinData().
Signed-off-by: Frederik Heber <heber@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/analysis_correlation.hpp

    r57cfb7 r6f9d14  
    6464  bool FirstMaxFound = false;
    6565
     66  if (map == NULL) {
     67    cerr << "Nothing to min/max, map is NULL!" << endl;
     68    return;
     69  }
     70
    6671  for (typename T::iterator runner = map->begin(); runner != map->end(); ++runner) {
    6772    if ((min > runner->first) || (!FirstMinFound)) {
     
    95100  pair <BinPairMap::iterator, bool > BinPairMapInserter;
    96101
     102  if (map == NULL) {
     103    cerr << "Nothing to bin, is NULL!" << endl;
     104    return outmap;
     105  }
     106
    97107  if (BinStart == BinEnd) { // if same, find range ourselves
    98108    GetMinMax( map, start, end);
Note: See TracChangeset for help on using the changeset viewer.