From db83e48019b9bc9524c57e04cb0260569e8f775d Mon Sep 17 00:00:00 2001 From: "bre..ns" Date: Tue, 5 Jul 2011 16:28:12 +0000 Subject: [PATCH] * fixed terrainGrid NPE on executor git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7825 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/terrain/com/jme3/terrain/geomipmap/TerrainGrid.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engine/src/terrain/com/jme3/terrain/geomipmap/TerrainGrid.java b/engine/src/terrain/com/jme3/terrain/geomipmap/TerrainGrid.java index 660f7f16a..584df0bba 100644 --- a/engine/src/terrain/com/jme3/terrain/geomipmap/TerrainGrid.java +++ b/engine/src/terrain/com/jme3/terrain/geomipmap/TerrainGrid.java @@ -239,6 +239,8 @@ public class TerrainGrid extends TerrainQuad { if (q1 == null || q2 == null || q3 == null || q4 == null) { try { + if (executor == null) + executor = createExecutorService(); executor.submit(new UpdateQuadCache(cam, true)).get(); q1 = cache.get(cam.add(quadIndex[5])); q2 = cache.get(cam.add(quadIndex[6]));