Validate PhysicsDirectSpaceState{2,3}D::_intersect_point input

This commit is contained in:
Haoyu Qiu 2022-02-14 22:21:28 +08:00
parent 6e73aa0497
commit 66838d88e1
2 changed files with 4 additions and 0 deletions

View file

@ -336,6 +336,8 @@ Dictionary PhysicsDirectSpaceState2D::_intersect_ray(const Ref<PhysicsRayQueryPa
} }
Array PhysicsDirectSpaceState2D::_intersect_point(const Ref<PhysicsPointQueryParameters2D> &p_point_query, int p_max_results) { Array PhysicsDirectSpaceState2D::_intersect_point(const Ref<PhysicsPointQueryParameters2D> &p_point_query, int p_max_results) {
ERR_FAIL_COND_V(p_point_query.is_null(), Array());
Vector<ShapeResult> ret; Vector<ShapeResult> ret;
ret.resize(p_max_results); ret.resize(p_max_results);

View file

@ -339,6 +339,8 @@ Dictionary PhysicsDirectSpaceState3D::_intersect_ray(const Ref<PhysicsRayQueryPa
} }
Array PhysicsDirectSpaceState3D::_intersect_point(const Ref<PhysicsPointQueryParameters3D> &p_point_query, int p_max_results) { Array PhysicsDirectSpaceState3D::_intersect_point(const Ref<PhysicsPointQueryParameters3D> &p_point_query, int p_max_results) {
ERR_FAIL_COND_V(p_point_query.is_null(), Array());
Vector<ShapeResult> ret; Vector<ShapeResult> ret;
ret.resize(p_max_results); ret.resize(p_max_results);