Permalink
Browse files

add snd checking

  • Loading branch information...
1 parent fa70a6a commit be74b9ba2f2589544690b9d9bd143456f78a7cde @jcarbaugh jcarbaugh committed Dec 21, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 dreamcast2.js
View
6 dreamcast2.js
@@ -213,7 +213,11 @@ if (window.log === undefined) {
var snd = soundManager.play(sound, {onfinish: function() {
out.ended = true;
}});
- out.pause = function() { snd.pause(); };
+ out.pause = function() {
+ if (snd && snd.pause) {
+ snd.pause();
+ }
+ };
return out;
}

0 comments on commit be74b9b

Please sign in to comment.