If there is a layer that hasn't frames but is not the active layer the pointer to frames can be NULL and crash. Now, the empty layers are skipped. Reported to me by Samuel Bernou.
If there is a layer that hasn't frames but is not the active layer the pointer to frames can be NULL and crash. Now, the empty layers are skipped. Reported to me by Samuel Bernou.