if (color && pointer)
pointer[n++] = color;