The Messenger of Allah ﷺ ruled regarding the unborn child of a woman from Banu Lahyan, who was delivered stillborn, that compensation be paid in the form of a male or female slave. Then the woman against whom the ruling of the slave-compensation was made passed away, and the Messenger of Allah ﷺ ruled that her inheritance went to her sons and her husband, while the blood-money was to be paid by her paternal male relatives.
أخبرنا قتيبة قال حدثنا الليث عن ابن شهاب عن ابن المسيب
قضى رسول الله ﷺ في جنين امرأة من بني لحيان سقط ميتا بغرة عبد أو أمة ثم إن المرأة التي قضى عليها بالغرة توفيت فقضى رسول الله ﷺ بأن ميراثها لبنيها وزوجها وأن العقل على عصبتها
Bukhari narrated it in the Book of Inheritance, chapter on the inheritance of the wife and husband along with the child and others, hadith no. 6740, and Muslim narrated it in the Book of Qasamah, chapter on the compensation for the fetus and the obligation of compensation in unintentional killing, etc., hadith no. 1681, from Qutayba, with the same chain, and it is also found in Al-Kubra, hadith no. 7021.