fix npe
[jFCPlib.git] / src / net / pterodactylus / fcp / highlevel / HighLevelClient.java
index a09b289..e62c428 100644 (file)
@@ -525,7 +525,9 @@ public class HighLevelClient {
         *            if there was no exception
         */
        private void disconnect(Throwable throwable) {
-               fcpConnection.close();
+               if (fcpConnection != null) {
+                       fcpConnection.close();
+               }
                fireClientDisconnected(throwable);
        }