1
1
mirror of https://github.com/exyte/Macaw.git synced 2024-07-14 16:30:34 +03:00

Merge pull request #471 from aure/master

Avoiding crash on multi-touch
This commit is contained in:
Yuri Strot 2018-09-04 10:14:42 +00:00 committed by GitHub
commit af9727e79a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -296,7 +296,9 @@ open class MacawView: MView, MGestureRecognizerDelegate {
var points = [TouchPoint]()
for initialTouch in initialTouches {
let currentIndex = touches.index(of: initialTouch)!
guard let currentIndex = touches.index(of: initialTouch) else {
continue
}
let currentTouch = touches[currentIndex]
let location = CGPoint(x: currentTouch.x, y: currentTouch.y)
let inverted = currentNode.place.invert()!