Before you sign on the dotted line, you should always look around a prospective property with a surveyor who can identify any issues to be aware of. These can include potentially costly problems such as subsidence, structural issues and hazardous materials like asbestos, as well as encroaching damp and mould. The surveyor will produce a report detailing these problems and highlight any major repairs and alterations you'll need to carry out.
When access is restricted to a house because it's unsafe, it's still worth inspecting the exterior to get an idea of the remedial costs involved. However, you should be prepared for hidden issues inside the property to wrack up significant costs – don't take a gamble on an unseen house unless you have the budget to cover the worst-case scenario.