This is an excellent question and one that deals a little bit more with family law issues than bankruptcy. There's enough crossover that I have had to address this issue quite a few times, though. I believe this answer should be applicable to all 50 states.
Your divorce decree, sometimes known as a marriage settlement agreement, is a final judgment. This is similar to a creditor judgment for an unpaid credit card balance. In your case, you are the creditor that has a judgment against your ex-husband to pay the second mortgage.
It is very important that you understand one thing: The divorce decree does not eliminate your liability on the loan, take your name off the loan or require the lender to sue your ex-husband only in the event of a loan default.
The lender does not care who pays the loan. You are both still legally responsible to pay. In your case, you just have a document that says he will make the payments. If he fails to make the payments, the lender can still sue you personally. And you would have to include him in the lawsuit because you have the divorce decree stating that he must pay. Or you would have to bring him back into court and demand he comply with the divorce decree.
In the event you sell the property for less than what it's worth, he would still be responsible for paying the second mortgage in the event you sell. This is known as a "short sale," when the lender accepts an offer to sell the property for less than what the property is worth.
If you sell the property via a short sale, the second mortgage lender may require that you pay something in order to allow the sale to go through. You and your ex-husband would still be responsible to pay that amount. And if he refuses to pay, you can use the divorce decree against him.
The divorce decree does protect you, but may still require you to fight to enforce it.
Ask the adviser
To ask a question of the Bankruptcy Adviser, go to the "Ask the Experts" page and select "Bankruptcy" as the topic. Read more Bankruptcy Adviser columns and more stories about debt management.