All Cyanogenmod 13 nightly builds past July 28 seem to be affected by a bug that makes the phone reboot just a few seconds after opening the Gallery application.
The issue seems to be related to the newly added support to sdcardfs which obviously isn’t playing well at the moment.
A workaround to prevent the phone from crashing and rebooting is to edit the build.prop file located in /system; this can be done either via adb using the command adb shell or more practically directly on the phone using the built in file manager and text editor (provided that in file manager’s settings access mode option is set to Root access mode).