X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdata%2Flogicsegment.cpp;h=8f5eab67a6eeaa1d1ca7e7ea6c405b555bed9bfd;hp=2f69e02dba3b7acc8794942caf5e26497f6bb930;hb=8e9e525e01e9cb4d05912a7adce0e6f2f910b90a;hpb=daeba21f166d5b8392c22e551733730f7765be92 diff --git a/pv/data/logicsegment.cpp b/pv/data/logicsegment.cpp index 2f69e02d..8f5eab67 100644 --- a/pv/data/logicsegment.cpp +++ b/pv/data/logicsegment.cpp @@ -371,6 +371,9 @@ void LogicSegment::get_subsampled_edges( void LogicSegment::get_surrounding_edges(vector &dest, uint64_t origin_sample, float min_length, int sig_index) { + if (origin_sample >= sample_count_) + return; + // Put the edges vector on the heap, it can become quite big until we can // use a get_subsampled_edges() implementation that searches backwards vector* edges = new vector;