The way to stop giving in is to get out…

Maybe you’d hoped you’d have a good influence [on your friend], but instead you discover that [they’re] having a bad influence on you. Your language is getting coarser, your jokes are getting cruder, and your imagination is becoming soiled. You’ve been doing things that make you uncomfortable. More and more often you’re surprised at yourself. At the beginning of the friendship, you hadn’t recognized its danger, maybe because you had a higher opinion of your virtue than it deserved. Eventually, you discover not only that you can be tempted but also that you have been tempted; not only that you have been tempted but also that in a hundred little ways you’ve been giving in. Finally you realize that the only way to stop giving in is to get out.

J. Budziszewski, from How to Stay Christian in College, p. 129