Skip to content

Commit

Permalink
CSSTUDIO-2412 Add null-checks for 'model_widget'.
Browse files Browse the repository at this point in the history
  • Loading branch information
abrahamwolk committed May 15, 2024
1 parent 994fbc9 commit 6cf9379
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,11 @@ private void valueChanged(WidgetProperty<?> property, Object old_value, Object n
Display display = vDouble.getDisplay();

// Set the units:
if (model_widget.propShowUnits().getValue() ) {
if (model_widget != null && model_widget.propShowUnits().getValue() ) {
meter.setUnits(display.getUnit());
}

if (model_widget.propLimitsFromPV().getValue()) {
if (model_widget != null && model_widget.propLimitsFromPV().getValue()) {
Range displayRange = display.getDisplayRange();
if ( displayRange != null
&& Double.isFinite(displayRange.getMinimum())
Expand Down

0 comments on commit 6cf9379

Please sign in to comment.