This is one of those 'tell it like it is' moments that you and your gf need to have.
Any friend you two have needs to be beneficial to the relationship somehow... either by it not affecting the relationship at all or contributing something good to it. This guy is interfering with the relationship --- greatly. Hell, the guy might as well be in bed with the two of you... because that's how bad this situation really is.
Tell her this guy is a bad influence on the relationship... that she needs to choose to either exclude this guy from both of your lives for the sake of the relationship... or she can throw away the relationship for the 'attention' she receives from someone who will only abuse her again.
The choice is hers... either she helps the relationship or she helps destroy it. You're not obligated to waste your time if she chooses the latter or she chooses to not make a choice at all.
"The weakest soul, knowing its own weakness, and believing this truth that strength can only be developed by effort and practice, will, thus believing, at once begin to exert itself, and, adding effort to effort, patience to patience, and strength to strength, will never cease to develop, and will at last grow divinely strong."
- James Allen