1
0
forked from 0ad/0ad

Make JS sound objects only self-destruct when fading to 0

This was SVN commit r7491.
This commit is contained in:
Ykkrosh 2010-05-01 16:10:02 +00:00
parent 4fe991074f
commit 49574953b8

View File

@ -121,7 +121,8 @@ bool JSI_Sound::Fade(JSContext* cx, uintN argc, jsval* argv)
// called from the dtor. solution is to neuter our Handle by
// setting it to 0 (ok since it'll be freed). this does mean that
// no further operations can be carried out during that final fade.
m_Handle = 0;
if (final_gain == 0.0f)
m_Handle = 0;
return true;
}