SamusAranX/USDConverter

Use more secure access

feixue299 opened this issue · 1 comments

let deduplicatedMatName = materialCountDict.filter({
                  return $0.value.map({
                    Substring($0.name) // Swift wants a Substring for some reason
                  }).contains(matName)
                })[0].key.name

to

let deduplicatedMatName = materialCountDict.filter({
                  return $0.value.map({
                    Substring($0.name) // Swift wants a Substring for some reason
                  }).contains(matName)
                }).first?.key.name

Fixed in version 1.7.