Avoid flooding the log with nullptr reference errors when closing a chat
This is similar to !310 (closed) but will avoid setting null any time, so it should be very reliable :)
This is similar to !310 (closed) but will avoid setting null any time, so it should be very reliable :)