From 70ec10065f2018de0c6d1caf5e5d399f9b8b5616 Mon Sep 17 00:00:00 2001 From: Gaston Dombiak Date: Sat, 24 Jan 2004 18:39:39 +0000 Subject: [PATCH] Prevents a NPE if DEBUG_ENABLED was set to true AFTER the connection was created git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2214 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/XMPPConnection.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/org/jivesoftware/smack/XMPPConnection.java b/source/org/jivesoftware/smack/XMPPConnection.java index ba2ff85f2..6e1828655 100644 --- a/source/org/jivesoftware/smack/XMPPConnection.java +++ b/source/org/jivesoftware/smack/XMPPConnection.java @@ -336,7 +336,9 @@ public class XMPPConnection { // If debugging is enabled, change the the debug window title to include the // name we are now logged-in as. - if (DEBUG_ENABLED) { + // If DEBUG_ENABLED was set to true AFTER the connection was created the debugger + // will be null + if (DEBUG_ENABLED && debugger != null) { debugger.userHasLogged(user); } } @@ -396,7 +398,9 @@ public class XMPPConnection { // If debugging is enabled, change the the debug window title to include the // name we are now logged-in as. - if (DEBUG_ENABLED) { + // If DEBUG_ENABLED was set to true AFTER the connection was created the debugger + // will be null + if (DEBUG_ENABLED && debugger != null) { debugger.userHasLogged(user); } }