Issue #1502 fix grid sampling unit null pointer.
Former-commit-id:00f0384065
[formerly e1618704972fad954ac61bc3aecb09f6767f1255] Former-commit-id:6409141383
This commit is contained in:
parent
6ff281dc98
commit
e03f073335
1 changed files with 2 additions and 1 deletions
|
@ -823,7 +823,8 @@ public abstract class AbstractGridResource<T extends AbstractResourceData>
|
|||
Unit<?> unit = data.getDataUnit();
|
||||
if (stylePreferences != null) {
|
||||
Unit<?> styleUnit = stylePreferences.getDisplayUnits();
|
||||
if (unit != null && unit.isCompatible(styleUnit)) {
|
||||
if (unit != null && styleUnit != null
|
||||
&& unit.isCompatible(styleUnit)) {
|
||||
value = (float) unit.getConverterTo(styleUnit).convert(value);
|
||||
unit = styleUnit;
|
||||
unitString = stylePreferences.getDisplayUnitLabel();
|
||||
|
|
Loading…
Add table
Reference in a new issue