What happens when the leased asset itself is sold to a new owner?

Leasing (إجارة): Sub-Lease, Assignment and Ijarah Certificates