fix a crash issue when try to open and save a picture into tzPalette
from gallery directly