The contractor who has undertaken to put only his work or skill, cannot claim any compensation if the work should be destroyed before its delivery, unless there has been delay in receiving it, or if the destruction was caused by the poor quality of the material, provided this fact was communicated in due time to the owner. If the material is lost through a fortuitous event, the contract is extinguished. (1590a)