From 3aca411f788bf6db0e4eebacf4b8cf40076e11f6 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Thu, 8 May 2014 16:57:34 -0700 Subject: ignore touch events that do not correspond to a tracked touch; fixes BananaBread crashes --- src/library_sdl.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/library_sdl.js b/src/library_sdl.js index 077f72eb..d5b2b354 100644 --- a/src/library_sdl.js +++ b/src/library_sdl.js @@ -789,6 +789,7 @@ var LibrarySDL = { } case 'touchstart': case 'touchend': case 'touchmove': { var touch = event.touch; + if (!Browser.touches[touch.identifier]) break; var w = Module['canvas'].width; var h = Module['canvas'].height; var x = Browser.touches[touch.identifier].x / w; -- cgit v1.2.3-18-g5258