From: Joel Holdsworth Date: Mon, 30 Sep 2013 12:19:38 +0000 (+0900) Subject: Don't attempt to set the value if TimeMarker::_value_widget has not been created X-Git-Tag: pulseview-0.2.0~272 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=317008bac93a797279be2265f40626cc772da353;p=pulseview.git Don't attempt to set the value if TimeMarker::_value_widget has not been created --- diff --git a/pv/view/timemarker.cpp b/pv/view/timemarker.cpp index 5fd75dd8..e40c393b 100644 --- a/pv/view/timemarker.cpp +++ b/pv/view/timemarker.cpp @@ -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(); }