Skip to content

Commit

Permalink
Added check for empty child list (#112)
Browse files Browse the repository at this point in the history
Co-authored-by: Julius Gyorfi <julius.s.gyorfi@nasa.gov>
  • Loading branch information
jgyorfi and Julius Gyorfi committed Mar 1, 2024
1 parent f7289ab commit f1d6b8d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ardor3d-core/src/main/java/com/ardor3d/scenegraph/Node.java
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ protected void updateChildren(final double time) {
* @return the child at a specified index.
*/
public Spatial getChild(final int i) {
if(_children.isEmpty()) {
return null;
}
return _children.get(i);
}

Expand Down

0 comments on commit f1d6b8d

Please sign in to comment.