This applies both from a legal perspective and an emotional one. Plan for it. Write it in to the original agreement. Don't wait for divorce or (worst case) death to find out how much trouble this can cause.
I have to say though, having my wife actually involved, for us, makes everything better. Its much easier to bear the risks and make tough decisions with each other's support. Your mileage may vary.