Handle not finding a music player for a song gracefully.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2389 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// $Id: SoundManager.java,v 1.58 2003/04/06 04:36:01 mdb Exp $
|
||||
// $Id: SoundManager.java,v 1.59 2003/04/08 01:46:16 ray Exp $
|
||||
|
||||
package com.threerings.media.sound;
|
||||
|
||||
@@ -468,6 +468,13 @@ public class SoundManager
|
||||
|
||||
Class playerClass = getMusicPlayerClass(music);
|
||||
|
||||
// if we don't have a player for this song, play the next song
|
||||
if (playerClass == null) {
|
||||
_musicStack.removeFirst();
|
||||
playTopMusic();
|
||||
return;
|
||||
}
|
||||
|
||||
// shutdown the old player if we're switching music types
|
||||
if (! playerClass.isInstance(_musicPlayer)) {
|
||||
if (_musicPlayer != null) {
|
||||
|
||||
Reference in New Issue
Block a user