Listening to Preachers Who Associate With Heretics?

What should we think about well-known preachers, with sound doctrine, who begin to associate or partner with others who have bad theology? Of course we shouldn’t listen to those with bad doctrine, but should we even separate ourselves from the well-known preacher with good doctrine who is associating with them?