summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/nicklist.c3
1 files changed, 3 insertions, 0 deletions
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);