mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-17 00:13:17 +00:00
Fix possible None unwrap
This commit is contained in:
@@ -64,7 +64,10 @@ fn tick_mixamo_import(
|
||||
) {
|
||||
for event in er_scene_events.read() {
|
||||
if let AssetEvent::LoadedWithDependencies { id } = event {
|
||||
let gltf = ra_gltfs.get(&**r_mixamo_import).unwrap();
|
||||
let Some(gltf) = ra_gltfs.get(&**r_mixamo_import) else {
|
||||
return;
|
||||
};
|
||||
|
||||
if gltf.default_scene.is_some() && gltf.default_scene.as_ref().unwrap().id() == *id {
|
||||
st_next.set(MixamoState::Spawning);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user