From 2f4eeda3975572614b2c50690d58df8ce448a5c4 Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Wed, 31 Oct 2012 15:53:57 +0000
Subject: [PATCH]  * i2ptunnel: Fix NPE in zzzot plugin

---
 .../java/src/net/i2p/i2ptunnel/TunnelController.java      | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/TunnelController.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/TunnelController.java
index 5ff15576d2..af9f3fbf1d 100644
--- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/TunnelController.java
+++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/TunnelController.java
@@ -322,7 +322,9 @@ public class TunnelController implements Logging {
                 I2PSession session = sessions.get(i);
                 if (_log.shouldLog(Log.INFO))
                     _log.info("Acquiring session " + session);
-                TunnelControllerGroup.getInstance().acquire(this, session);
+                TunnelControllerGroup group = TunnelControllerGroup.getInstance();
+                if (group != null)
+                    group.acquire(this, session);
             }
             _sessions = sessions;
         } else {
@@ -341,7 +343,9 @@ public class TunnelController implements Logging {
                 I2PSession s = _sessions.get(i);
                 if (_log.shouldLog(Log.INFO))
                     _log.info("Releasing session " + s);
-                TunnelControllerGroup.getInstance().release(this, s);
+                TunnelControllerGroup group = TunnelControllerGroup.getInstance();
+                if (group != null)
+                    group.release(this, s);
             }
             // _sessions.clear() ????
         } else {
-- 
GitLab