Don't try to remove non-eixtant listeners

--HG--
extra : convert_revision : 87058f74626cd6795ecd495cc22779618c70eaa8
This commit is contained in:
Matt Johnston 2004-08-18 16:31:05 +00:00
parent 1e94425015
commit abf66aa7a1

View File

@ -171,8 +171,12 @@ void x11cleanup(struct ChanSess *chansess) {
m_free(chansess->x11authprot);
m_free(chansess->x11authcookie);
remove_listener(chansess->x11listener);
chansess->x11listener = NULL;
TRACE(("chansess %s", chansess));
if (chansess->x11listener != NULL) {
remove_listener(chansess->x11listener);
chansess->x11listener = NULL;
}
}
static const struct ChanType chan_x11 = {