stage: check for radius<=0 in stage_clear_hazards_at
This commit is contained in:
parent
071d1163fd
commit
fcc068f0e5
1 changed files with 5 additions and 0 deletions
|
@ -736,6 +736,11 @@ static bool ellipse_predicate(EntityInterface *ent, void *varg) {
|
|||
|
||||
void stage_clear_hazards_at(cmplx origin, double radius, ClearHazardsFlags flags) {
|
||||
Circle area = { origin, radius };
|
||||
|
||||
if(UNLIKELY(radius <= 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
stage_clear_hazards_predicate(proximity_predicate, &area, flags);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue