summaryrefslogtreecommitdiff
path: root/src/newgrf_sound.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/newgrf_sound.cpp')
-rw-r--r--src/newgrf_sound.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf_sound.cpp b/src/newgrf_sound.cpp
index 16990faf5..7bc44e04b 100644
--- a/src/newgrf_sound.cpp
+++ b/src/newgrf_sound.cpp
@@ -37,7 +37,7 @@ void InitializeSoundPool(void)
FileEntry *GetSound(uint index)
{
- if (index >= _sound_count) return NULL;
+ if (index >= GetNumSounds()) return NULL;
return GetSoundInternal(index);
}