diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelClientBase.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelClientBase.java
index fa9d26736712413a91aa9028827097b3db212275..dab5522145c08ac41e6136ad80db363aa4a8cce2 100644
--- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelClientBase.java
+++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelClientBase.java
@@ -881,8 +881,11 @@ public abstract class I2PTunnelClientBase extends I2PTunnelTask implements Runna
     @Override
     public synchronized boolean destroy() {
         close(true);
-        if (_ownDest)
-            sockMgr.destroySocketManager();
+        if (_ownDest) {
+            I2PSocketManager sm = sockMgr;
+            if (sm != null)
+                sm.destroySocketManager();
+        }
         return true;
     }