Srimad Bhagavatam Canto 10, Chapter 29, Text 25

SB 10.29.25

duhsilo durbhago vrddho
 jado rogy adhano ’pi va
patih stribhir na hatavyo
 lokepsubhir apataki
Women who desire a good destination in the next life should never abandon a husband who has not fallen from his religious standards, even if he is obnoxious, unfortunate, old, unintelligent, sickly or poor.
Srila Visvanatha Cakravarti quotes a similar statement from smrti-sastra: patim tv apatitam bhajet. “One should serve a master who is not fallen.” Sometimes the foolish argument is given that even if a husband falls down from spiritual principles, his wife should continue to follow him since he is her “guru.” In fact, since Krsna consciousness cannot be subordinated to any other religious principle, a guru who engages his follower in materialistic, sinful activities loses his status as a guru. Srila Prabhupada stated that the system of monarchy collapsed in Europe because the monarchs abused and exploited their position. Similarly, in the Western world men have abused and exploited women, and now there is a popular movement in which women reject the authority of their husbands. Ideally, men should be staunch in spiritual life and give pure, sincere guidance to the women under their care.
The gopis, of course, being on the highest platform of spiritual perfection, were transcendental to all positive and negative religious considerations. In other words, they were the eternal lovers of the Absolute Truth.
Srimad Bhagavatam Canto 10, Chapter 29, Text 24
Srimad Bhagavatam Canto 10, Chapter 29, Text 26