]> sigrok.org Git - pulseview.git/blobdiff - pv/data/analog.cpp
Fix #1629 more by fixing the notification handling
[pulseview.git] / pv / data / analog.cpp
index 9010097cee28bd9f314de88d378eaee8de6a56cf..da9736b53fe29210d808fbb54a86c06c64889833 100644 (file)
@@ -64,9 +64,11 @@ uint32_t Analog::get_segment_count() const
 
 void Analog::clear()
 {
-       segments_.clear();
+       if (!segments_.empty()) {
+               segments_.clear();
 
-       samples_cleared();
+               samples_cleared();
+       }
 }
 
 void Analog::set_samplerate(double value)