What does ‘dodge the bullet’ mean?

( vp ) To luckily avoid misfortune. When the draft was around, I dodged the bullet because I was flat-footed and my dad was the mayor.