1. Always carry an extra empty memory card with you. Memory cards are so small. It won't take up much room in your camera bag, your purse or your wallet.
2. Get in a habit: When your done with a picture taking session, copy your photos to your computer, burn a back-up CD and then delete you photos from your memory card. The you won't ever have this mistake happen again.
p.s. Don't get caught without fresh camera batteries either.