Whoever corrects a mocker invites insult; whoever rebukes a wicked man incurs abuse. Do not rebuke a mocker or he will hate you; rebuke a wise man and he will love you. Instruct a wise man and he will be wiser still; teach a righteous man and he will add to his learning.
I think Donald Robert Perry said it more succinctly:
Proverbs 9:7-9
Provided your rebuke is sound.
Ouch. There is too much truth to this. Dangerous stuff.