fix npe
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Tue, 13 May 2008 21:47:57 +0000 (21:47 +0000)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Tue, 13 May 2008 21:47:57 +0000 (21:47 +0000)
git-svn-id: http://trooper/svn/projects/jFCPlib/branch/high-level-client@867 c3eda9e8-030b-0410-8277-bc7414b0a119

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);
        }