Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleArrayPanel.java @ 3836:06c76de19b51
Fix NullPointerException
Check if array is null before accessing its length property.
flys-client/trunk@5545 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Bjoern Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Fri, 21 Sep 2012 07:59:25 +0000 |
parents | 1fae113b93fd |
children | 360e22afb98b |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleArrayPanel.java Thu Sep 20 14:17:21 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DoubleArrayPanel.java Fri Sep 21 07:59:25 2012 +0000 @@ -100,7 +100,7 @@ public void setValues(double[] values) { NumberFormat f = NumberFormat.getDecimalFormat(); - if(values.length == 0) { + if(values == null || values.length == 0) { ti.clearValue(); return; }