DroidFish: Avoid NPE if creating a MediaPlayer object fails.

This commit is contained in:
Peter Osterlund
2013-02-15 17:22:44 +00:00
parent eefda143b5
commit f05e0fe48a

View File

@@ -2938,6 +2938,7 @@ public class DroidFish extends Activity implements GUIInterface {
if (moveSound != null)
moveSound.release();
moveSound = MediaPlayer.create(this, R.raw.movesound);
if (moveSound != null)
moveSound.start();
}
if (vibrateEnabled) {