In Anderson v. Shattuck, 76 N.H. 240, 242 (1911), the plaintiff contractors “had already performed a substantial part of the work they contracted to do, when the fire destroyed the buildings.” Even though they weren't entitled to be paid under their contract (because they hadn't performed it), the Court found that “the labor and materials actually furnished by the plaintiffs were attached to the defendant's real estate as the work progressed and constituted a benefit to the defendant for which the plaintiffs are entitled to recover.” That was true even though “[t]here has been no breach of the express contract by the defendant, and neither party is in fault for the fire which put an end to the contract and caused the situation now existing between the parties. But justice does not require that they should remain in that situation, or that the contractors should be remediless, merely because they cannot maintain an action against the defendant upon the contract.” Invoking a legal doctrine called quantum meruit (literally “the amount deserved”), the Court awarded “an apportionment of so much of the agreed compensation to the contractor as he has earned in what he has done; he recovers such part of the entire amount as is equal to the part he has performed of the whole contract.” Id. at 243.
Applying the equitable principle of quantum meruit, rather than a strict contract-based recovery, will also mean that other contractual conditions to payment won't apply. Often the parties' contract will provide that progress payments are to be made in the amount certified by an architect or engineer, who periodically reviews the work to decide how much has fairly been earned by the contractor. If the structure is destroyed before the architect or engineer can perform a progress payment inspection to gauge the extent of work performed since the last payment, the contractor may be out of luck on a contract-based theory, as the certification of the architect is a condition precedent to the owner's obligation to pay. But in the quantum meruit setting, courts can do justice without the bridles of strict contract law principles.
In Anderson the owner had obtained fire insurance, and the question arose as to whether the contractors were entitled to be paid from the insurance proceeds. The Court ruled that they were entitled. What if there had been no insurance? For all that appears in the case, the principle of quantum meruit still applies. This suggests that it is the owner, not the contractor, who bears the risk of loss to partially completed work where “neither party is at fault” for the loss.
Bottom line: The rule seems to be that in the absence of a contract providing for a different rule, the risk of loss from unpreventable acts of God is on the owner, who must pay for construction he won't get to enjoy.