From f3319d3fd650346adc2c5526909f27d9759a793f Mon Sep 17 00:00:00 2001 From: Riccardo Balbo Date: Thu, 23 Jun 2016 22:05:05 +0200 Subject: [PATCH] Fix npe --- .../src/main/java/com/jme3/environment/util/EnvMapUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/environment/util/EnvMapUtils.java b/jme3-core/src/main/java/com/jme3/environment/util/EnvMapUtils.java index 09f582723..9474cb257 100644 --- a/jme3-core/src/main/java/com/jme3/environment/util/EnvMapUtils.java +++ b/jme3-core/src/main/java/com/jme3/environment/util/EnvMapUtils.java @@ -608,7 +608,7 @@ public class EnvMapUtils { } for (int i = 0; i < 6; i++) { - ByteBuffer buf = BufferUtils.createByteBuffer(targetMapSize * targetMapSize * store.getImage().getFormat().getBitsPerPixel()/8); + ByteBuffer buf = BufferUtils.createByteBuffer(targetMapSize * targetMapSize * irrCubeMap.getImage().getFormat().getBitsPerPixel()/8); irrCubeMap.getImage().setData(i, buf); }