mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2024-12-29 02:35:06 +08:00
fix: Add null checks to ScaleAdjusterPreview (#1116)
* fix: Add null checks to ScaleAdjusterPreview * chore: check for destroyed objects as well --------- Co-authored-by: bd_ <bd_@nadena.dev>
This commit is contained in:
parent
73755e7664
commit
3eaf8bee6d
@ -328,7 +328,7 @@ namespace nadena.dev.modular_avatar.core.editor
|
||||
|
||||
var rootBone = _finalBonesMap.TryGetValue(smr.rootBone, out var newRootBone) ? newRootBone : smr.rootBone;
|
||||
smr.rootBone = rootBone;
|
||||
smr.bones = smr.bones.Select(b => _finalBonesMap.GetValueOrDefault(b, b)).ToArray();
|
||||
smr.bones = smr.bones.Select(b => b == null ? null : _finalBonesMap.GetValueOrDefault(b, b)).ToArray();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
@ -341,4 +341,4 @@ namespace nadena.dev.modular_avatar.core.editor
|
||||
_boneStates.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user