Skip to content

Commit dc97fd4

Browse files
mockersfProfLander
authored andcommitted
don't panic on unknown ambiguity (bevyengine#7950)
1 parent b430714 commit dc97fd4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/bevy_ecs/src/schedule/schedule.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,18 +1138,18 @@ impl ScheduleGraph {
11381138
ambiguous_with_flattened.add_edge(lhs, rhs, ());
11391139
}
11401140
(NodeId::Set(_), NodeId::System(_)) => {
1141-
for &lhs_ in set_systems.get(&lhs).unwrap() {
1141+
for &lhs_ in set_systems.get(&lhs).unwrap_or(&Vec::new()) {
11421142
ambiguous_with_flattened.add_edge(lhs_, rhs, ());
11431143
}
11441144
}
11451145
(NodeId::System(_), NodeId::Set(_)) => {
1146-
for &rhs_ in set_systems.get(&rhs).unwrap() {
1146+
for &rhs_ in set_systems.get(&rhs).unwrap_or(&Vec::new()) {
11471147
ambiguous_with_flattened.add_edge(lhs, rhs_, ());
11481148
}
11491149
}
11501150
(NodeId::Set(_), NodeId::Set(_)) => {
1151-
for &lhs_ in set_systems.get(&lhs).unwrap() {
1152-
for &rhs_ in set_systems.get(&rhs).unwrap() {
1151+
for &lhs_ in set_systems.get(&lhs).unwrap_or(&Vec::new()) {
1152+
for &rhs_ in set_systems.get(&rhs).unwrap_or(&vec![]) {
11531153
ambiguous_with_flattened.add_edge(lhs_, rhs_, ());
11541154
}
11551155
}

0 commit comments

Comments
 (0)