Fix overlappingObjects vector crash

use clear_overlaps() instead of clearing overlappingObjects directly

(cherry picked from commit 4e987f5ab9)
This commit is contained in:
volzhs 2020-07-14 02:34:18 +09:00 committed by Rémi Verschelde
parent 8218170b3c
commit cfda32add0
1 changed files with 1 additions and 1 deletions

View File

@ -181,7 +181,7 @@ void AreaBullet::reload_body() {
void AreaBullet::set_space(SpaceBullet *p_space) { void AreaBullet::set_space(SpaceBullet *p_space) {
// Clear the old space if there is one // Clear the old space if there is one
if (space) { if (space) {
overlappingObjects.clear(); clear_overlaps(false);
isScratched = false; isScratched = false;
// Remove this object form the physics world // Remove this object form the physics world