I agree that you absolutely did the right thing. I would (and have) done the same thing in the past.
My Story:
When Jackie was a puppy, I was walking her early one morning. Up ahead, at the corner, a female pit bull (who lived in our townhouse complex at the time, and who I knew to be unfriendly to other dogs) emerged. Her owner was walking her on the intersecting street (OFF LEASH!

), and she was a good deal ahead of him. She turned her head, saw my little fluffy pup, and immedately charged for her. Instinct & terror took over, and I scooped my girl up, just barely saving her and almost getting knocked over in the process. Thankfully, her owner caught up to her after her first lunge & pulled her off me.
I would rather overreact than risk anything happening to my dog. When other dogs are charging at you, with an owner that clearly DID NOT have control . . . you react and protect your baby the best you can.