Add some checks for the sound manager. Fixes the segfault when using -quickstart.
This was SVN commit r13453.
This commit is contained in:
parent
5b1f5dd2c1
commit
d20849d1c4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user