Recently I've heard of older folks adopting puppies from shelters, and while it's great that any dog can be saved, there really needs to be put some thought put behind making sure that if a dog is going to outlive you, that you make arrangements for taking care of him or her.
The cause of this problem is obvious: people aren't inclined to believe that their pet is going to outlive them. A dog lives somewhere between 10 and 20 years and you're sure you have at least that much time, right?
Passing away is the most obvious way that someone could be stopped from providing care from their dog. Being incapacitated by old age or illness, having some unexpected financial hardship arise, and/or being put into a nursing home are just some of the things that can happen.
Accidents can happen. They aren't your fault and shouldn't count against your dog either.
Don't make the assumption that your friends and family are automatically going to take the pet. They may love to come and visit you and your faithful companion, but they may have their own challenges that prevent them from taking in another mouth to feed.
I'd recommend talking with those closest to you about which of them could step in should the time come to save your dog from winding up at a shelter. Put it in your will (or living trust) if you're so inclined.