Bakomim alai mi'rayim tishmana oznai - Dovid Hamelech says that when those who wanted to cause evil to befall him rise against him, his ears should listen.
Often, our friends don't tell us how we need to improve for fear of hurting our feelings, while our enemies don't hesitate. So if someone says something critical - listen and examine. It could be that he is doing you a big favor by pointing out an area of your character which requires improvement [although his intentions in telling you are less than pure].
One of the 48 ways to acquire Torah is "Ohev es hatochachos" loving rebuke. It would be wonderful if we all had a friend or Rebbe who would sensitively point out our flaws to us from time to time.
[See the sefer Doleh Umashke Page 298]