Experience of stressful life events is associated with risk of depression. Yet many exposed individuals do not become depressed. A controversial hypothesis is that genetic factors influence vulnerability to depression following stress. This hypothesis is most commonly tested with a "diathesis-stress" model, in which genes confer excess vulnerability. We tested an alternative model, in which genes may buffer against the depressogenic effects of life stress. We measured the hypothesized genetic buffer using a polygenic score derived from a published genome-wide association study (GWAS) of subjective wellbeing. We tested if married older adults who had higher polygenic scores were less vulnerable to depressive symptoms following the death of their spouse as compared to age-peers who had also lost their spouse and who had lower polygenic scores. We analyzed data from N=9,453 non-Hispanic white adults in the Health and Retirement Study (HRS), a population-representative longitudinal study of older adults in the United States. HRS adults with higher wellbeing polygenic scores experienced fewer depressive symptoms during follow-up. Those who survived death of their spouses during follow-up (n=1,829) experienced a sharp increase in depressive symptoms following the death and returned toward baseline over the following two years. Having a higher polygenic score buffered against increased depressive symptoms following a spouse's death. Effects were small and clinical relevance is uncertain, although polygenic score analyses may provide clues to behavioral pathways that can serve as therapeutic targets. Future studies of gene-environment interplay in depression may benefit from focus on genetics discovered for putative protective factors.