Changeset - r12043:09b52ef58850
[Not reviewed]
master
0 1 0
yexo - 15 years ago 2009-05-28 16:43:16
yexo@openttd.org
(svn r16455) -Fix: don't crash when a newgrf has sounds in an unsupported sound format
1 file changed with 4 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/newgrf_sound.cpp
Show inline comments
 
@@ -9,6 +9,7 @@
 
#include "vehicle_base.h"
 
#include "sound_func.h"
 
#include "core/smallvec_type.hpp"
 
#include "core/mem_func.hpp"
 

	
 
static SmallVector<SoundEntry, ORIGINAL_SAMPLE_COUNT> _sounds;
 

	
 
@@ -16,7 +17,9 @@ static SmallVector<SoundEntry, ORIGINAL_
 
/* Allocate a new Sound */
 
SoundEntry *AllocateSound()
 
{
 
	return _sounds.Append();
 
	SoundEntry *sound = _sounds.Append();
 
	MemSetT(sound, 0);
 
	return sound;
 
}
 

	
 

	
0 comments (0 inline, 0 general)