He made his house a waqf for his children who are in need, and now the house is very old and about to collapse
Question

Someone made his house a waqf for any of his sons or daughters who are in need. Many years after he died, the house has become very old and is about to collapse. What should his sons and daughters do? Should they sell the house or what?
Praise be to Allah.Firstly:
It is valid to establish a waqf for one’s children and descendants, and the condition stipulated by the one who established the waqf should be carried out. For example, if he stipulated that it is only for the needy among them, then it should be limited to them.
Al-Bukhaari said in his Saheeh: az-Zubayr gave his houses in charity and said that they were for any of his daughters who were divorced, to live in and not cause harm or be harmed, but if she got married and had no need of it, then she had no right to it. End quote.
It says in Zaad al-Mustaqni‘: If someone establishes a waqf for his children or the children of someone else, then for the poor, then it belongs to his children, males and females equally, then to the children of his sons, but not of his daughters, such as if he said it is for his children’s children, and the offspring of his loins (i.e., through the male line).
Secondly:
If a waqf falls into disrepair and needs to be repaired and renovated, it is permissible to sell part of it in order to renovate the rest of it. If that is not possible, it may be sold in its entirety, and the money may be used to buy another house which then becomes a waqf.
Ibn Qudamah (may Allah have mercy on him) said: To sum up: if a waqf falls into disrepair and can no longer be used – such as a house that collapses; or land that is laid waste and becomes disused, and cannot be restored; or a mosque that is deserted by the local people and is now in a place where no one prays, or has become too small for its people and cannot be expanded in the place where it is, or the building has developed cracks throughout and it is not possible to renovate it or part of it except by selling part of it – then in that case it is permissible to sell part of it in order to use the money to renovate the rest of it.
If it is not possible to make use of any part of it, then it may be sold in its entirety.
Ahmad said, according to the report of Abu Dawood: If there are two wooden beams in the mosque that are of value, it is permissible to sell them and spend the money on the mosque. According to a report narrated by Saalih, the mosque may be relocated if there is fear of thieves, or if its location becomes polluted. Al-Qaadi said: That is: if that makes it impossible to pray in it."(Al-Mughni (5/368).
Dr. ‘Abd al-‘Azeez ibn Sa‘d ad-Dughaythir was asked: I have a waqf that is in need of repairs and renovation, and the tenants have left. What is the right way to renovate the waqf according to Islamic teachings?
He replied: What you must do is take the cost of renovations from the yield of the waqf. If the yield is not sufficient to cover the costs, then the person in charge of the waqf may seek a loan or financing to renovate the waqf, and pay it back from the yield. That is for the purpose of renovating it so that it may be used, on condition that the qaadi (judge) gives permission for that, and it is not possible to rent out the property and cover these costs from the rent. The Hanbalis did not stipulate that permission be obtained from the qaadi. Al-Bahooti said: The one who is in charge of the waqf may seek a loan for that, without seeking permission from the judge, because that is in the interests of the waqf, just as he buys things for the waqf, whether on credit or for cash.
If the yield is not sufficient to cover the costs of renovating it, and it is not possible to seek a loan for the waqf, then the person who is in charge of it may sell part of the waqf in order to renovate the rest of it. The Hanbalis regard it as permissible to sell parts of waqfs in order to renovate the rest, if the waqf was established by a single individual for a single purpose, such as if a single individual made two houses into a waqf, for example. If they fall into disrepair, one of them may be sold in order to use the money to renovate the other one, but it should not be renovated from another waqf.End quote
Thirdly:
If the one who established the waqf did not stipulate any beneficiaries after his sons and daughters, so he did not say “then for their children and those who come after them,” or “then for the poor,” then when his children die, or if there is no one among them who is needy, it becomes a waqf without specific beneficiaries. In this case, the ruling is that it goes to the heirs of the one who established the waqf, and is a waqf for them, according to their shares of inheritance, so long as the one who established it did not stipulate anything to the contrary.
See: al-Mawsoo‘ah al-Fiqhiyyah (44/147).
And Allah knows best.