src/channel: fix possible null reference in joining