Skip to content

Commit a11bed2

Browse files
committed
fix sdl shutdown crash
1 parent 95feb64 commit a11bed2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/library_sdl.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,9 @@ var LibrarySDL = {
707707

708708
SDL_Quit: function() {
709709
for (var i = 0; i < SDL.numChannels; ++i) {
710-
SDL.channels[i].audio.pause();
710+
if (SDL.channels[i].audio) {
711+
SDL.channels[i].audio.pause();
712+
}
711713
}
712714
if (SDL.music.audio) {
713715
SDL.music.audio.pause();

0 commit comments

Comments
 (0)