From ddd736fb0cc5a9bcc3bdf74daa373e0eac8848d1 Mon Sep 17 00:00:00 2001 From: JohnBrookes Date: Thu, 12 Dec 2013 14:46:53 +0000 Subject: [PATCH] Fix for TouchManager and stage2d touch issues --- src/away3d/core/managers/Touch3DManager.as | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/away3d/core/managers/Touch3DManager.as b/src/away3d/core/managers/Touch3DManager.as index e65cc0cd7..172e71ab1 100644 --- a/src/away3d/core/managers/Touch3DManager.as +++ b/src/away3d/core/managers/Touch3DManager.as @@ -207,6 +207,9 @@ package away3d.core.managers { var touch:TouchPoint = _touchPointFromId[ event.touchPointID ]; + + if (!touch) return; + touch.x = event.stageX; touch.y = event.stageY; @@ -222,6 +225,8 @@ package away3d.core.managers var touch:TouchPoint = _touchPointFromId[ event.touchPointID ]; + if (!touch) return; + _collidingObject = _collidingObjectFromTouchId[ touch.id ]; if (_collidingObject) queueDispatch(TouchEvent3D.TOUCH_END, event, _collidingObject, touch);