There is some hard-to-reproduce scenario when top level would have masks allocated, but without masks on the sculpt level. Need to check proper array before accessing its elements. The check for top-level masks is done by the caller.
There is some hard-to-reproduce scenario when top level would have masks allocated, but without masks on the sculpt level. Need to check proper array before accessing its elements. The check for top-level masks is done by the caller.