From 0c27026978db579d0fd7105f5164b341b95f5f66 Mon Sep 17 00:00:00 2001 From: jmekaelthas <76w1dxnh> Date: Fri, 31 Oct 2014 08:43:20 +0100 Subject: [PATCH] Bugfix: fixed a bug that caused NPE to be raised when Subsurface modifier worked on an edge without faces. --- .../com/jme3/scene/plugins/blender/meshes/TemporalMesh.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/meshes/TemporalMesh.java b/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/meshes/TemporalMesh.java index f65d38ed5..05d3dcb11 100644 --- a/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/meshes/TemporalMesh.java +++ b/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/meshes/TemporalMesh.java @@ -194,7 +194,10 @@ public class TemporalMesh extends Geometry { */ public List getAdjacentFaces(Edge edge) { List result = new ArrayList(indexToFaceMapping.get(edge.getFirstIndex())); - result.retainAll(indexToFaceMapping.get(edge.getSecondIndex())); + List secondIndexAdjacentFaces = indexToFaceMapping.get(edge.getSecondIndex()); + if(secondIndexAdjacentFaces != null) { + result.retainAll(indexToFaceMapping.get(edge.getSecondIndex())); + } return result; }