소스 검색

- add null check to TerrainLodControl

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9821 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
nor..67 13 년 전
부모
커밋
2f7f270d6f
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      engine/src/terrain/com/jme3/terrain/geomipmap/TerrainLodControl.java

+ 3 - 0
engine/src/terrain/com/jme3/terrain/geomipmap/TerrainLodControl.java

@@ -201,6 +201,9 @@ public class TerrainLodControl extends AbstractControl {
     
     protected void prepareTerrain() {
         TerrainQuad terrain = (TerrainQuad)getSpatial();
+        if(terrain == null){
+            return;
+        }
         terrain.cacheTerrainTransforms();// cache the terrain's world transforms so they can be accessed on the separate thread safely
     }