Fix possible crashes in getColorAt for the picker