The Messenger of Allah ﷺ visited Dubaa bint Zubayr bin Abdul-Muttalib and asked, "What keeps you from Hajj, aunt?"She replied, "Messenger of Allah, I am an ailing woman, and I fear being prevented from completing it."He said, "Enter the state of consecration and make the condition that you will be released wherever you are held back."
حدثنا ابن نمير قال حدثنا عثمان بن حكيم
أن رسول الله ﷺ دخل على ضباعة بنت الزبير بن عبد المطلب فقال ما يمنعك من الحج يا عمة قالت يا رسول الله إني امرأة سقيمة وإني أخاف الحبس قال فأحرمي واشترطي أن محلك حيث حبست
Its chain of transmission is hasan. Abu Bakr bin Abdullah bin Zubayr was not criticized by anyone, and he said in Taqrib, "obscure." The hadith has already passed shortly before with this wording, and Ibn Majah related it, 2/979, no. 2936.