Try to fix #1972 (things went wrong when stk tried to delete uninitialised

sound sources).
This commit is contained in:
hiker 2015-02-11 09:16:48 +11:00
parent a598b0ed1a
commit f57ad3c1ed
2 changed files with 2 additions and 2 deletions

View File

@ -165,7 +165,7 @@ void MusicInformation::startMusic()
delete m_normal_music;
m_normal_music = NULL;
Log::warn("MusicInformation", "Unable to load music %s, "
"not supported or not found.\n",
"not supported or not found.",
m_normal_filename.c_str());
return;
}

View File

@ -67,7 +67,7 @@ SFXOpenAL::SFXOpenAL(SFXBuffer* buffer, bool positional, float volume,
* buffer. */
SFXOpenAL::~SFXOpenAL()
{
if (m_status!=SFX_UNKNOWN)
if (m_status!=SFX_UNKNOWN && m_status!=SFX_NOT_INITIALISED)
{
alDeleteSources(1, &m_sound_source);
}