From 2ed38db288726d258adb920086ec7e20696da055 Mon Sep 17 00:00:00 2001 From: hikerstk Date: Wed, 27 Mar 2013 12:17:09 +0000 Subject: [PATCH] Fix #890 - crash when deleting tracks (caused by not adjusting indices in main track group when a track is deleted. That happened since the soccer mode was added). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12586 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/tracks/track_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tracks/track_manager.cpp b/src/tracks/track_manager.cpp index 3b3c45a9e..47acef9a8 100644 --- a/src/tracks/track_manager.cpp +++ b/src/tracks/track_manager.cpp @@ -260,7 +260,7 @@ void TrackManager::removeTrack(const std::string &ident) // Adjust all indices of tracks with an index number higher than // the removed track, since they have been moved down. This must // be done for all tracks and all arenas - for(unsigned int i=0; i<2; i++) // i=0: soccer arenas, i=0: arenas, i=1: tracks + for(unsigned int i=0; i<3; i++) // i=0: soccer arenas, i=1: arenas, i=2: tracks { Group2Indices &g2i = (i==0 ? m_soccer_arena_groups : (i==1 ? m_arena_groups :