Am I in the wrong?

Kaitlyn
Is it okay to be friends with a guy in a relationship?
I have a couple guy friends like this and I don't flirt with them at all and if they try anything with me I drop them as a friend or shut them down. These guys I've been friends with before they even got in a relationship and I would never try anything with them. My girl friends always look down on me and say "you know he has a girlfriend" am I doing something wrong?