This is an automated email from the ASF dual-hosted git repository.
desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git
The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
new 50be7b1 Fix a NullPointerException.
50be7b1 is described below
commit 50be7b12d1403e2d7c0297bcff593fc4894fe928
Author: Martin Desruisseaux <[email protected]>
AuthorDate: Fri Mar 19 15:15:35 2021 +0100
Fix a NullPointerException.
---
.../sis/referencing/operation/projection/TransverseMercator.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/TransverseMercator.java
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/TransverseMercator.java
index e60f892..01dd54d 100644
---
a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/TransverseMercator.java
+++
b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/TransverseMercator.java
@@ -356,7 +356,9 @@ public class TransverseMercator extends
NormalizedProjection {
* in such cases a {@link ProjectionException} should be thrown instead.
*/
private static Matrix outsideDomainOfValidity(final double[] dstPts, final
int dstOff, final boolean derivate) {
- dstPts[dstOff] = dstPts[dstOff+1] = Double.NaN;
+ if (dstPts != null) {
+ dstPts[dstOff] = dstPts[dstOff+1] = Double.NaN;
+ }
if (derivate) {
return new Matrix2(Double.NaN, Double.NaN, Double.NaN, Double.NaN);
}