From: David ‘Bombe’ Roden Date: Mon, 5 Aug 2013 17:16:14 +0000 (+0200) Subject: Prevent NPE on closing. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=53bbea2c3dcdba5d4a66800cccd8c320d8548a69;p=xudocci.git Prevent NPE on closing. --- diff --git a/src/main/java/net/pterodactylus/irc/Connection.java b/src/main/java/net/pterodactylus/irc/Connection.java index ec063f6..f48b205 100644 --- a/src/main/java/net/pterodactylus/irc/Connection.java +++ b/src/main/java/net/pterodactylus/irc/Connection.java @@ -325,7 +325,9 @@ public class Connection extends AbstractExecutionThreadService implements Servic * if an I/O error occurs */ public void close() throws IOException { - connectionHandler.close(); + if (connectionHandler != null) { + connectionHandler.close(); + } } //