When structural damage can justify leaving
Possibly. If structural damage makes a rental genuinely unsafe or unlivable and the landlord will not fix it, California law may allow you to move out under "constructive eviction" — but doing it the wrong way can leave you owing rent.
Breaking a lease is a serious step. Constructive eviction generally requires severe conditions, notice to the landlord and a fair chance to fix them, and that you actually move out because the home is unlivable. Serious structural hazards a landlord refuses to address can qualify, but the pieces have to be in place.
If a building is so unsafe that a city inspector orders it vacated, that raises separate issues, including possible relocation rights. Because the risk of owing rent is real, run this past an attorney first. Before you move out over structural damage, a free, confidential review can help you avoid a costly mistake.
This is general information about California tenant rights, not legal advice. Every situation is different.