The Prophet of Allah ﷺ said, "Whoever has a partner in a walled garden must not sell his share until he first offers it to his partner."
حدثنا علي بن خشرم حدثنا عيسى بن يونس عن سعيد عن قتادة عن سليمان اليشكري
أن نبي الله ﷺ قال من كان له شريك في حائط فلا يبيع نصيبه من ذلك حتى يعرضه على شريكه
Sourcing, sahih. Ahmad reported it (3/357) through Saeed bin Abu Aruba, and Muslim reported it, h. 1608, through Jabir bin Abdullah. Hakim graded it sahih (2/56), and Dhahabi agreed with him.Sulayman Taymi's statement, its chain is sahih.