Since 1987, the Texas Family Code has invalidated life insurance designations in favor of ex-spouses, except for limited exceptions. The Texas legislature presumed that the insured did not intend to maintain the ex-spouse as a beneficiary unless shown otherwise.
However, courts have ruled that such laws are essentially invalidated in circumstances where the policy is governed by federal law as opposed to state law. The US Supreme Court is currently considering a Virginia law that is somewhat similar to the one in Texas. It provides that the widow has a cause of action against the former spouse to recover the benefits. Based on prior decisions, the Virginia Supreme court ruled that the Federal Employee's Group Life Insurance policy was governed by Federal law, trumping the Virginia law. This Washington Post story reviews the details of the case.