From 8ba1989227f293afea962652d0b2cb137ab51052 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 13 Mar 2002 01:30:20 +0000 Subject: [PATCH] Set ownnick to channel->NULL when the nick record is destroyed. Should fix some perl script errors. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2592 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/nicklist.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/nicklist.c b/src/core/nicklist.c index b7e85407..7b97cb8e 100644 --- a/src/core/nicklist.c +++ b/src/core/nicklist.c @@ -102,6 +102,9 @@ static void nicklist_destroy(CHANNEL_REC *channel, NICK_REC *nick) { signal_emit("nicklist remove", 2, channel, nick); + if (channel->ownnick == nick) + channel->ownnick = NULL; + /*MODULE_DATA_DEINIT(nick);*/ g_free(nick->nick); g_free_not_null(nick->realname);