From eb18904840cc7d4a6830bf0711f4682af50f1abc Mon Sep 17 00:00:00 2001 From: ailin-nemui Date: Fri, 5 Jan 2018 22:13:23 +0100 Subject: fix crash in notifylist --- src/core/servers.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/servers.c b/src/core/servers.c index b1da9b7e..0abfdfb0 100644 --- a/src/core/servers.c +++ b/src/core/servers.c @@ -524,7 +524,12 @@ int server_unref(SERVER_REC *server) return TRUE; } - signal_emit("server destroyed", 1, server); + /* since module initialisation uses server connected, only let + them know that the object got destroyed if the server was + disconnected */ + if (server->disconnected) + signal_emit("server destroyed", 1, server); + MODULE_DATA_DEINIT(server); server_connect_unref(server->connrec); if (server->rawlog != NULL) rawlog_destroy(server->rawlog); -- cgit v1.2.3