Try to fix #1972 (things went wrong when stk tried to delete uninitialised
sound sources).
This commit is contained in:
parent
a598b0ed1a
commit
f57ad3c1ed
@ -165,7 +165,7 @@ void MusicInformation::startMusic()
|
|||||||
delete m_normal_music;
|
delete m_normal_music;
|
||||||
m_normal_music = NULL;
|
m_normal_music = NULL;
|
||||||
Log::warn("MusicInformation", "Unable to load music %s, "
|
Log::warn("MusicInformation", "Unable to load music %s, "
|
||||||
"not supported or not found.\n",
|
"not supported or not found.",
|
||||||
m_normal_filename.c_str());
|
m_normal_filename.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,7 @@ SFXOpenAL::SFXOpenAL(SFXBuffer* buffer, bool positional, float volume,
|
|||||||
* buffer. */
|
* buffer. */
|
||||||
SFXOpenAL::~SFXOpenAL()
|
SFXOpenAL::~SFXOpenAL()
|
||||||
{
|
{
|
||||||
if (m_status!=SFX_UNKNOWN)
|
if (m_status!=SFX_UNKNOWN && m_status!=SFX_NOT_INITIALISED)
|
||||||
{
|
{
|
||||||
alDeleteSources(1, &m_sound_source);
|
alDeleteSources(1, &m_sound_source);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user