]> sigrok.org Git - pulseview.git/commitdiff
Don't attempt to set the value if TimeMarker::_value_widget has not been created
authorJoel Holdsworth <redacted>
Mon, 30 Sep 2013 12:19:38 +0000 (21:19 +0900)
committerJoel Holdsworth <redacted>
Sun, 13 Oct 2013 10:05:22 +0000 (11:05 +0100)
pv/view/timemarker.cpp

index 5fd75dd8db91c4104a91b0a70b044f86374daedb..e40c393ba6e629e32724f9cba1c382bf4d48a5a3 100644 (file)
@@ -47,9 +47,13 @@ double TimeMarker::time() const
 void TimeMarker::set_time(double time)
 {
        _time = time;
-       _updating_value_widget = true;
-       _value_widget->setValue(time);
-       _updating_value_widget = false;
+
+       if (_value_widget) {
+               _updating_value_widget = true;
+               _value_widget->setValue(time);
+               _updating_value_widget = false;
+       }
+
        time_changed();
 }