소스 검색

solve issue #1930 (NPE in FbxLayerElement) (#1931)

Stephen Gold 2 년 전
부모
커밋
d313a32a4c
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/mesh/FbxLayerElement.java

+ 2 - 2
jme3-plugins/src/fbx/java/com/jme3/scene/plugins/fbx/mesh/FbxLayerElement.java

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2020 jMonkeyEngine
+ * Copyright (c) 2009-2023 jMonkeyEngine
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -196,7 +196,7 @@ public class FbxLayerElement {
                 layerElement.name = (String) child.properties.get(0);
             }
         }
-        if (layerElement.data == null) {
+        if (layerElement.data == null && layerElement.dataIndices != null) {
             // For Smoothing / Materials, data = dataIndices
             layerElement.refInfoType = ReferenceInformationType.Direct;
             layerElement.data = new Integer[layerElement.dataIndices.length];