Browse Source

Fix overlappingObjects vector crash

use clear_overlaps() instead of clearing overlappingObjects directly

(cherry picked from commit 4e987f5ab91ee0455858cf29ecebf1df050e565f)
volzhs 5 years ago
parent
commit
cfda32add0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules/bullet/area_bullet.cpp

+ 1 - 1
modules/bullet/area_bullet.cpp

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