That depends obviously, wether you agree with the problem or not, if your girlfriend was unfairly attacked or it was blown out of proportions.
Criticism isnt a bad thing, however when it is taken out of proportions and done in a bad way it can be bad, but then you'd have to wonder, what was wrong, the point of the attack or the way ot was being done.
Perhaps there was no need to stand up for the girlfriend but to ask the friend to calm down.
You always need to try to remain objective to take a good decision taking all aspects of the issue into consideration, perhaps there was some wrong with the boyfriend not standing up for his girlfriend but was it bad enough to "do something about it"? Perhaps his girlfriend didnt even care about the girl ranting.
Nevertheless and to give a more straight fordward answer, it is always good to have a partner who has your back :)