Historic castle in Poland in danger of collapsing