It is narrated from Ibn Abbas (may Allah be pleased with them both) that the Prophet (peace and blessings be upon him) said to Sayyidah Duba'ah (may Allah be pleased with her): "Perform Hajj, and make the condition that I will leave ihram wherever You detain me."
Hadith Referenceالمعجم الكبير للطبراني / مسند النساء / 21199