Yes, you did. You may stop him or defend the person he backbite or leave the room.

 I sit with my parents, my father says nasty things about others and I stop him to the best of my ability, it does stop then it starts again then I stop him then he started again then I stopped him, for the 3rd he did it again I stood up to leave then he promised to stop. Did I do the right thing?