summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorailin-nemui <ailin-nemui@users.noreply.github.com>2018-01-05 22:13:23 +0100
committerailin-nemui <ailin-nemui@users.noreply.github.com>2018-01-05 22:13:23 +0100
commiteb18904840cc7d4a6830bf0711f4682af50f1abc (patch)
tree2414c90b242cfccf94a1ca02229614092ecae992 /src/core
parentc9b3d87eb7ef2ce99f659d7e567fc83629439142 (diff)
downloadirssi-eb18904840cc7d4a6830bf0711f4682af50f1abc.zip
fix crash in notifylist
Diffstat (limited to 'src/core')
-rw-r--r--src/core/servers.c7
1 files changed, 6 insertions, 1 deletions
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);