Project

General

Profile

« Previous | Next » 

Revision 64750913

Added by Patrick Plitzner over 7 years ago

  • fixed potential NPE (#4448)

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/description/StatisticalMeasurementValueElement.java
75 75
	@Override
76 76
	public void handleEvent(Object eventSource) {
77 77
		if(eventSource == number_value){
78
			getEntity().setValue(number_value.getFloat());
78
			Float floatNumber = number_value.getFloat();
79
			if(floatNumber==null){
80
			    String zero = "0.0";
81
                floatNumber = new Float(zero);
82
			    number_value.setText(zero);
83
			}
84
            getEntity().setValue(floatNumber);
79 85
		}
80 86
		else if(eventSource == combo_type){
81 87
			getEntity().setType(combo_type.getSelection());

Also available in: Unified diff