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