Fix crash when clicking on dismiss, sometimes.
client->dismiss(this) ends up setting client to nullptr, so the disconnect() warns about null receiver and doesn't actually disconnect.
client->dismiss(this) ends up setting client to nullptr, so the disconnect() warns about null receiver and doesn't actually disconnect.