Check that the new variable isn't null, not the one that we just checked two lines ago

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@779 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Charlie Groves
2009-03-05 23:15:42 +00:00
parent 77d71ce7ed
commit ad9837830b
@@ -113,7 +113,7 @@ public class OpenALSoundPlayer extends SoundPlayer
public void setClipVolume (final float vol) public void setClipVolume (final float vol)
{ {
super.setClipVolume(vol); super.setClipVolume(vol);
_ticker.postRunnable(new Runnable() { getSoundQueue().postRunnable(new Runnable() {
public void run () { public void run () {
_alSoundManager.setBaseGain(vol); _alSoundManager.setBaseGain(vol);
}}); }});
@@ -294,7 +294,8 @@ public class OpenALSoundPlayer extends SoundPlayer
for (Stream stream : _alSoundManager.getStreams()) { for (Stream stream : _alSoundManager.getStreams()) {
stream.dispose(); stream.dispose();
} }
}}); }
});
} }
/** /**
@@ -307,7 +308,7 @@ public class OpenALSoundPlayer extends SoundPlayer
Preconditions.checkNotNull(bundle, Preconditions.checkNotNull(bundle,
"Unable to find the bundle name for a package [package=%s, key=%s]", pkgPath, key); "Unable to find the bundle name for a package [package=%s, key=%s]", pkgPath, key);
String[] names = _loader.getPaths(pkgPath, key); String[] names = _loader.getPaths(pkgPath, key);
Preconditions.checkNotNull(bundle, "No such sound [package=%s, key=%s]", pkgPath, key); Preconditions.checkNotNull(names, "No such sound [package=%s, key=%s]", pkgPath, key);
String[] paths = new String[names.length]; String[] paths = new String[names.length];
for (int ii = 0; ii < paths.length; ii++) { for (int ii = 0; ii < paths.length; ii++) {
paths[ii] = bundle + ":" + names[ii]; paths[ii] = bundle + ":" + names[ii];