In the event of cancellation or termination of the contract by the court, following an action by a third party, the holder of the partnership contract may claim compensation for the expenses it has incurred in accordance with the contract, provided that they were useful to the purchaser.