Skip to content

Commit 8861ff5

Browse files
stephengoldAli-RS
authored andcommitted
solve issue #1930 (NPE in FbxLayerElement) (#1931)
1 parent fcd8ecc commit 8861ff5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2009-2020 jMonkeyEngine
2+
* Copyright (c) 2009-2023 jMonkeyEngine
33
* All rights reserved.
44
*
55
* Redistribution and use in source and binary forms, with or without
@@ -196,7 +196,7 @@ public static FbxLayerElement fromElement(FbxElement element) {
196196
layerElement.name = (String) child.properties.get(0);
197197
}
198198
}
199-
if (layerElement.data == null) {
199+
if (layerElement.data == null && layerElement.dataIndices != null) {
200200
// For Smoothing / Materials, data = dataIndices
201201
layerElement.refInfoType = ReferenceInformationType.Direct;
202202
layerElement.data = new Integer[layerElement.dataIndices.length];

0 commit comments

Comments
 (0)