Skip to content

Commit 528c4fe

Browse files
marwiehybridherbst
authored andcommitted
Fix nullref exception loading FBX
https://linear.app/needle/issue/NE-5340
1 parent 8b3de10 commit 528c4fe

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/jsm/loaders/FBXLoader.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -899,9 +899,9 @@ class FBXTreeParser {
899899
const modelNode = modelNodes[ model.ID ];
900900
scope.setLookAtProperties( model, modelNode );
901901

902-
const parentConnections = connections.get( model.ID ).parents;
902+
const parentConnections = connections.get( model.ID )?.parents;
903903

904-
parentConnections.forEach( function ( connection ) {
904+
parentConnections?.forEach( function ( connection ) {
905905

906906
const parent = modelMap.get( connection.ID );
907907
if ( parent !== undefined ) parent.add( model );
@@ -1016,7 +1016,7 @@ class FBXTreeParser {
10161016

10171017
let bone = null;
10181018

1019-
relationships.parents.forEach( function ( parent ) {
1019+
relationships?.parents.forEach( function ( parent ) {
10201020

10211021
for ( const ID in skeletons ) {
10221022

0 commit comments

Comments
 (0)