diff options
author | Geert Hauwaerts <geert@hauwaerts.be> | 2015-06-12 17:44:13 +0200 |
---|---|---|
committer | Geert Hauwaerts <geert@hauwaerts.be> | 2015-06-12 17:44:13 +0200 |
commit | 4cc6fdaaab5db3d22e195b1d0912dae40348e140 (patch) | |
tree | ace75521b02e4cced9a31713905a6bada57c3321 | |
parent | 01510b7d9efd4caa1e41780488658c130224d9cd (diff) | |
download | irssi-4cc6fdaaab5db3d22e195b1d0912dae40348e140.zip |
Add server check in irc_server_connect (#208)
Fail instead of crash, if irc_server_connect is called without object.
(#208)
-rw-r--r-- | src/irc/core/irc-servers.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index d7122eae..c5e1e318 100644 --- a/src/irc/core/irc-servers.c +++ b/src/irc/core/irc-servers.c @@ -314,6 +314,8 @@ SERVER_REC *irc_server_init_connect(SERVER_CONNECT_REC *conn) void irc_server_connect(SERVER_REC *server) { + g_return_if_fail(server != NULL); + if (!server_start_connect(server)) { server_connect_unref(server->connrec); g_free(server); |