Skip to content

Commit 9062429

Browse files
committed
bugfix: NPE in SelectedRagdoll
1 parent f6dca4c commit 9062429

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
The com.jme3 software packages are Copyright (c) 2009-2019 jMonkeyEngine
2-
The maud software packages are Copyright (c) 2017-2024 Stephen Gold
2+
The maud software packages are Copyright (c) 2017-2025 Stephen Gold
33

44
All rights reserved.
55

src/main/java/maud/model/cgm/SelectedRagdoll.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2018-2023, Stephen Gold
2+
Copyright (c) 2018-2025 Stephen Gold
33
All rights reserved.
44
55
Redistribution and use in source and binary forms, with or without
@@ -298,7 +298,7 @@ void setCgm(Cgm newCgm) {
298298
Spatial setSpatial(Spatial newSpatial) {
299299
CgmPhysics physics = cgm.getPhysics();
300300
DynamicAnimControl dac = find();
301-
Spatial oldSpatial = dac.getSpatial();
301+
Spatial oldSpatial = (dac == null) ? null : dac.getSpatial();
302302
if (oldSpatial != null) {
303303
physics.removePhysicsControl(dac);
304304

0 commit comments

Comments
 (0)