Add some checks for the sound manager. Fixes the segfault when using -quickstart.

This was SVN commit r13453.
This commit is contained in:
leper 2013-06-05 22:10:11 +00:00
parent 5b1f5dd2c1
commit d20849d1c4

View File

@ -34,6 +34,7 @@
JMusicList::JMusicList()
{
#if CONFIG2_AUDIO
if ( g_SoundManager )
g_SoundManager->ClearPlayListItems();
#endif
}
@ -45,7 +46,8 @@ bool JMusicList::AddItem(JSContext* cx, uintN UNUSED(argc), jsval* vp)
return false;
#if CONFIG2_AUDIO
g_SoundManager->AddPlayListItem( VfsPath( filename ) );
if ( g_SoundManager )
g_SoundManager->AddPlayListItem( VfsPath( filename ) );
#endif
return true;