The terms dictated by a prenup can still be enforced following death so ideally your prenuptial agreement will specify what your wishes are if either you or your partner were to die.