Always buy a new helmet, if you child has been in an accident, and the helmet has taken some blows.
If the the helmet has a crack or compressed foam, it's not going to work probably the next time. Hopefully there will not be a next time, but the odds are against you - especially when dealing with small children that basically just learned to walk.
If in a crash - get rid of the helmet. Plain and simple. Use it for roleplay instead. The animal shaped bicycle helmets, are a great way to inspire and develop the imagination of the little ones, and the helmets can be a great toy to play with (just remember to remove the straps if using it for roleplaying inside).
Needles to say - never EVER buy a bicycle helmet in a second hand thrift store. There might be some money that can be saved, but you never know how the bicycle helmet has been handled previously.
To sum it up:
- In a crash? - Discard the helmet and buy a new one
- Check up on the helmet once in a while, and make sure there are no cracks or bumps.
- Never EVER buy a used bicycle helmet from friends, thrift stores, Ebay or similar.
As always let me know if you have any questions.
Have a great day and stay safe!