From: Joel Holdsworth Date: Sun, 16 Sep 2012 16:25:54 +0000 (+0100) Subject: Added a sanity check to LogicSignal::paint X-Git-Tag: pulseview-0.1.0~297 X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff_plain;h=c352ce6001d9f21eed1903f4363a4f6d181371de;hp=3db297c4f9c6cf3023e68b1f9e37ac4ea1c7ef3c Added a sanity check to LogicSignal::paint --- diff --git a/logicsignal.cpp b/logicsignal.cpp index 8d2d0045..c42a610f 100644 --- a/logicsignal.cpp +++ b/logicsignal.cpp @@ -89,6 +89,7 @@ void LogicSignal::paint(QPainter &p, const QRect &rect, double scale, min(max((int64_t)floor(start), (int64_t)0), last_sample), min(max((int64_t)ceil(end), (int64_t)0), last_sample), samples_per_pixel, _probe_index); + assert(edges.size() >= 2); // Paint the edges const unsigned int edge_count = edges.size() - 2;