My 2 cents in accordance to the context you've provided: You handled the situation well. Asking to speak to the professor away from your lab partner was a nice strategy. Otherwise it might have come across as patronizing to your lab partner, and made him feel even worse. Plus, consulting the professor outside the classroom seems like the more professional approach, versus firing back at him in front of his other students. So, nice touch overall; and very brave of you.
Bad people win when good people decide to do nothing.
Although, who's who is... subjective. Do you know whether or not your professor is going through difficult issues of his own, and has absolutely no one to help him? Or is he just inherently a jerk?
Disclaimer: By no means am I encouraging a confrontational attitude towards faculty. It's an issue that requires merit. Strive to reach mutual respect and understanding.