In these situaties, your rental contract stops automatically:
You are the only tenant and you die: Your rental contract ends automatically at the end of the second month after your death. Your heirs must pay the 2 months rent plus a compensation of 1 month's rent. But they can also decide to continue your rental contract. They must notify the landlord within 2 months of your death.
Your rental property is completely destroyed by accident. Examples are fire, flood, tornado and so on. Your rental contract then stops automatically. Is your rental property only partially destroyed? Then you can ask the justice of peace for reduction of the rent or the termination of your rental contract.