From 7005376061d7076782c0d4bef4c22bf835e51257 Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Wed, 29 Aug 2012 13:29:13 +0000
Subject: [PATCH]    - Fix NPE on destroy() if init() failed

---
 .../i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java b/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java
index 5a69a9c903..e333f3cc5f 100644
--- a/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java
+++ b/apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java
@@ -89,7 +89,8 @@ public class I2PSnarkServlet extends DefaultServlet {
     
     @Override
     public void destroy() {
-        _manager.stop();
+        if (_manager != null)
+            _manager.stop();
         super.destroy();
     }
 
-- 
GitLab