Closed stepman0 closed 5 years ago
I can see that region.Rotation may be nil and maybe also region.Name, although none of my photos did ever raise this exception. On the other hand, I cannot see how photoRotation may be nil under any circumstance: it's properly initialized in line 306 ff. Anyway, the checks won't hurt and I would do it like this: personTag.rotation = ifnil(photoRotation, 0) personTag.trotation = ifnil(region.Rotation, 0) personTag.name = ifnil(region.Name, '')
Could you give me some environment info:
Thanks, Martin
To be honest, I am not quite sure if really both photoRotation and region.Rotation were nil, it was late in the evening when I looked into this. I just added both checks to be sure.
Your notation is much better then mine, I don't have much experience with lua.
I had multiple issues where exporting of my pictures failed. Debugged showed that either personTag.rotation or personTag.trotation where nil.
I added a check and set them to zero in case of nil.