CINE: Add a safeguard to avoid a divide by zero in Palette::save()