Ignore:
Timestamp:
07/30/11 16:15:46 (13 years ago)
Author:
tbretz
Message:
Fixed a bug when iterators point to empty lists.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/gui/RawEventsViewer/RawEventsViewer.cc

    r11705 r11723  
    15151515        }
    15161516    }
    1517     it--;
    1518     xval[nsamples] = it->first+1;
     1517    xval[nsamples] = it==boardsHistoMap.begin() ? 0 : (--it)->first+1;
    15191518    yval[nsamples] = 0;
    15201519    nsamples++;
     
    15541553        }
    15551554   }
    1556     it--;
    1557     xval[nsamples] = it->first+1;
     1555    xval[nsamples] = it==pixelHistoMap.begin() ? 0 : (--it)->first+1;
    15581556    yval[nsamples] = 0;
    15591557    nsamples++;
     
    15931591        }
    15941592    }
    1595     it--;
    1596     xval[nsamples] = it->first+1;
     1593    xval[nsamples] = it==timeMarksMap.begin() ? 0 : (--it)->first+1;
    15971594    yval[nsamples] = 0;
    15981595    nsamples++;
     
    16311628            break;
    16321629        }
    1633    }
    1634     it--;
    1635     xval[nsamples] = it->first+1;
     1630    }
     1631    xval[nsamples] = it==delayMap.begin() ? 0 : (--it)->first+1;
    16361632    yval[nsamples] = 0;
    16371633    nsamples++;
     
    16421638       triggerDelayHistoItem.setSamples(xval, yval, nsamples);
    16431639#endif
    1644 
    16451640
    16461641//    startCellHistoZoom->setZoomBase(startCellHistoItem.boundingRect());
Note: See TracChangeset for help on using the changeset viewer.