This is called the frustration of purpose. It's a doctrine about how cases would be solved if unforeseen circumstances were to occur. A modern example would be if you took a mortgage but an earthquake completely destroyed your house. Due to the frustration of purpose, you could have your mortgage canceled because you don't have a house that the mortgage was for, so you wouldn't have to pay for it any more.