Rent control can be a slippery situation in San Francisco, and almost as soon as you've got it, it's time to worry about losing it. Particularly if you live in a roommate situation where the other tenant is the only one on the lease.

When your roommate moves on, you're almost certain to face a rent hike, if your landlord is paying any attention whatsoever.

So, what does a law-abiding, cash-poor renter do?

Here to untangle the thicket of rules surrounding roommates and rent control is tenant rights attorney Joseph Tobener of the Tobener Law Center, who put together a flowchart to help you navigate the law in trying times.

As Tobener (whom you may remember from the famous case of 315 percent rent hike in Bernal) explained to Curbed SF, much of what happens when a roommate plans to leave is the landlord's prerogative.

Whether or not you can keep your existing rent hinges on a few factors, like whether you can establish standing as a co-tenant (even if you're not on the lease) and if, and how, the landlord notified you that new rental rates would go into effect.

After your roommate leaves, you may be able to demonstrate your co-tenancy—and thus stave off a rent increase—if the landlord failed to issue a notice or increase the rent quickly enough and if you moved into the unit before January 1, 1996. You may also be a co-tenant if the landlord hasn't raised the rent but has been accepting rent checks directly from you.

These are the exceptions, though; most scenarios will point you to the depressing if lawful box that says "Landlord can likely increase rent."

If you are facing eviction and require legal assistance, the Eviction Defense Collaborative and the San Francisco Tenants Union helps low-income tenants respond to eviction lawsuits on a sliding-scale fee.