# HG changeset patch # User Matt Johnston # Date 1092846665 0 # Node ID b855bf63766c4c1c3018602ea3aaa5a7f1937857 # Parent c85c88500ea607946954ff8adfe5afeafa5977ef Don't try to remove non-eixtant listeners diff -r c85c88500ea6 -r b855bf63766c svr-x11fwd.c --- a/svr-x11fwd.c Wed Aug 18 15:48:25 2004 +0000 +++ b/svr-x11fwd.c Wed Aug 18 16:31:05 2004 +0000 @@ -171,8 +171,12 @@ 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 = {