J.C. Penney (JCPN.Q) survived a disastrous attempt to remake itself in a more modern image, limply hanging on as it tries to make a real go of a turnaround. Yet just as customers seem poised to flock back to its stores, looming in the background is a risk so large it could knock the venerable department store chain down for the count.

Perhaps one of the more curious changes former CEO Ron Johnson made at the retailer was signing up domestic diva Martha Stewart's company to sell her home goods wares in-store despite an exclusive contract that prohibited Martha Stewart Living Omnimedia (MSO.DL) from selling branded bed, bath, and kitchen goods anywhere but at Macy's (M -0.07%).

Soon after the deal with Penney's was announced, Macy's hauled Martha Stewart into court, charging a breach of contract, and soon after collared its rival as well, alleging it interfered with its contract with Stewart. After some initial posturing, including unbranding Stewart's wares by selling them under the "JCP Everyday" label, Penney has all but admitted it's in the wrong. It narrowed the product selection it will sell from Stewart, reduced by several years the amount of time the two will be partners, returned 11 million shares it got in the company when they signed their arrangement, and gave up its two seats on Martha Stewart's board of directors.

All that was left for it to do was settle with Macy's for the contract dispute. After hearings in New York's supreme court (which, for clarification, is not the state's highest court, but rather is the equivalent of the superior court level in other states), the judge highly recommended the parties come to a resolution on their own before he was forced to do it for them. They've now had four months to come to an agreement but by all indications have been unable to do so.

That's particularly troubling because Macy's and Martha Stewart just resolved their differences on terms that while not disclosed were said to be immaterial to both. As Macy's was keen to point out, though, regardless of the outcome with Stewart, it did not have any bearing on its case against Penney, and for that reason I think it's likely a ruling by the courts in Macy's favor could deal a death blow to its rival.

The department store is really already clinging to a threadbare lifeline. The jump in comps it experienced in November was as a result of launching a substantial promotional campaign. While that's what both its consumers and Wall Street analysts were looking for, it admittedly cuts into the very profit margins it's going to need to survive. Also, Penney said it will be reducing the prominence of national brands in its stores, limiting the size of Joe Fresh and doing away with several other departments in favor of house brands, while emphasizing home goods more. Those have been popular with consumers and worked to boost sales, but it also means margins will be further squeezed as it dumps merchandise on the racks to get rid of it.

A ruling against it by the court could jeopardize J.C. Penney's recovery, perhaps irreversibly so. I've been supportive of the retailer's turnaround for a while now, but this intransigence to settling has me concerned the road back to financial health has veered off into the wilderness again.