Fix a crash.
This commit is contained in:
parent
cfee1d747a
commit
7d179b45f7
|
@ -220,7 +220,7 @@ fn calculate_path(
|
||||||
.remove::<Speed>();
|
.remove::<Speed>();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let map = map.single();
|
if let Ok(map) = map.get_single() {
|
||||||
let coordinates_clone = *coordinates;
|
let coordinates_clone = *coordinates;
|
||||||
let destination_clone = *destination;
|
let destination_clone = *destination;
|
||||||
let query_pipeline_clone = query_pipeline.clone();
|
let query_pipeline_clone = query_pipeline.clone();
|
||||||
|
@ -244,6 +244,7 @@ fn calculate_path(
|
||||||
.remove::<Path>()
|
.remove::<Path>()
|
||||||
.remove::<NoPath>();
|
.remove::<NoPath>();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn poll_tasks(mut commands: Commands, mut query: Query<(Entity, &mut Calculating)>) {
|
fn poll_tasks(mut commands: Commands, mut query: Query<(Entity, &mut Calculating)>) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user