mirror of
https://github.com/exyte/Macaw.git
synced 2024-09-11 13:15:35 +03:00
Avoid force unwrapping of the initial touch index
This commit is contained in:
parent
654df3ab69
commit
46d8a81739
@ -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()!
|
||||
|
Loading…
Reference in New Issue
Block a user