[vlma-devel] commit: Avoid potential NPE. (Adrien Grand )

git version control git at videolan.org
Mon Dec 22 17:58:52 CET 2008


vlma | branch: master | Adrien Grand <jpountz at videolan.org> | Mon Dec 22 17:45:17 2008 +0100| [849df87e415d4fb1ba6a6655b0ae45bb855d7820] | committer: Adrien Grand 

Avoid potential NPE.

> http://git.videolan.org/gitweb.cgi/vlma.git/?a=commit;h=849df87e415d4fb1ba6a6655b0ae45bb855d7820
---

 .../org/videolan/vlma/notifier/IRCNotifier.java    |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/vlma-core/src/main/java/org/videolan/vlma/notifier/IRCNotifier.java b/vlma-core/src/main/java/org/videolan/vlma/notifier/IRCNotifier.java
index 99657d7..dedf75e 100644
--- a/vlma-core/src/main/java/org/videolan/vlma/notifier/IRCNotifier.java
+++ b/vlma-core/src/main/java/org/videolan/vlma/notifier/IRCNotifier.java
@@ -127,7 +127,9 @@ public class IRCNotifier extends Notifier {
     @Override
     public void destroy() {
         if(conn != null) {
-            conn.doQuit("VLMa daemon stopping. Quitting IRC.");
+            if (conn.isConnected()) {
+                conn.doQuit("VLMa daemon stopping. Quitting IRC.");
+            }
             conn.close();
         }
     }



More information about the vlma-devel mailing list