CameraEngine icon indicating copy to clipboard operation
CameraEngine copied to clipboard

NSArrayM was mutated while being enumerated.

Open ghost opened this issue 7 years ago • 2 comments

Can't seem to find a fix for this one. Anyone? See pic.

skaermbillede 2017-05-12 09 13 31

ghost avatar May 12 '17 07:05 ghost

Anyone??

ghost avatar May 13 '17 10:05 ghost

NSArrayM was mutated while being enumerated.

This error simply means dont make changes to an array as youre looping though it.

In a nutshell, change this

        for item in items {
            if item = "temp" {
                items.remove(item)
            }
        }

into this

        let itemsCopy = items
        for item in itemsCopy {
            if item = "temp" {
                items.remove(item)
            }
        }

see here for more info

multinerd avatar Sep 15 '17 18:09 multinerd