When a dog is charging at you and your child, you don't have a whole lot of time to act and think every scenario through, unfortunately.  It's really easy to be judgmental after the fact. Unless you are ever in such a situation, you don't know how you would react.