- fixed: Trying to remove sector tags for line-less sectors crashed when there were no sector tags at all in a map.

This commit is contained in:
Christoph Oelckers 2015-05-06 23:24:27 +02:00
parent bfc10f4c5e
commit 96fa3b124e
1 changed files with 8 additions and 5 deletions

View File

@ -98,13 +98,16 @@ void FTagManager::AddSectorTag(int sector, int tag)
void FTagManager::RemoveSectorTags(int sect) void FTagManager::RemoveSectorTags(int sect)
{ {
int start = startForSector[sect]; if (startForSector.Size() > 0)
if (start >= 0)
{ {
while (allTags[start].target == sect) int start = startForSector[sect];
if (start >= 0)
{ {
allTags[start].tag = allTags[start].target = -1; while (allTags[start].target == sect)
start++; {
allTags[start].tag = allTags[start].target = -1;
start++;
}
} }
} }
} }