Bugfix: fixed a bug that caused NPE to be raised when Subsurface

modifier worked on an edge without faces.
This commit is contained in:
jmekaelthas 2014-10-31 08:43:20 +01:00
parent f364d66640
commit 0c27026978

View File

@ -194,7 +194,10 @@ public class TemporalMesh extends Geometry {
*/
public List<Face> getAdjacentFaces(Edge edge) {
List<Face> result = new ArrayList<Face>(indexToFaceMapping.get(edge.getFirstIndex()));
result.retainAll(indexToFaceMapping.get(edge.getSecondIndex()));
List<Face> secondIndexAdjacentFaces = indexToFaceMapping.get(edge.getSecondIndex());
if(secondIndexAdjacentFaces != null) {
result.retainAll(indexToFaceMapping.get(edge.getSecondIndex()));
}
return result;
}