mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 13:47:58 +03:00
Fix wrong pointer being deleted
This commit is contained in:
parent
2dbe61789d
commit
1500d213e7
1 changed files with 2 additions and 2 deletions
|
@ -472,8 +472,8 @@ PlayerStart *DM_Team::GetRandomSpawnpointWithMetric(
|
|||
spot = GetRandomSpawnpointFromList(points, numSpots);
|
||||
for (int i = 0; i < numSpots; i++) {
|
||||
// delete all created spawnpoint
|
||||
if (points[numSpots].spawnpoint != spot) {
|
||||
delete points[numSpots].spawnpoint;
|
||||
if (points[i].spawnpoint != spot) {
|
||||
delete points[i].spawnpoint;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue