Harry Potter was saved by a mother's love more than once. Harry may not of had his mother but he had a lot of comfort from mother like figures. Whenever Harry needed comfort it was always from a mother figure.
I'd like to point out that Hermione stopped smiling 1 year before Harry and Ron did. She probably knew the danger long before them <--- I'd like to point out that Harry stopped smiling after year two and Hermoine smiled year three.