From 256b6673f8e33ac400a07c021223c497cf849fb5 Mon Sep 17 00:00:00 2001 From: Damian Minkov Date: Thu, 10 Jul 2014 17:52:39 +0300 Subject: [PATCH] Fixes IllegalArgumentException if otr is disabled. --- .../java/sip/communicator/plugin/otr/OtrActivator.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/net/java/sip/communicator/plugin/otr/OtrActivator.java b/src/net/java/sip/communicator/plugin/otr/OtrActivator.java index e69d9cfaf..69087784a 100644 --- a/src/net/java/sip/communicator/plugin/otr/OtrActivator.java +++ b/src/net/java/sip/communicator/plugin/otr/OtrActivator.java @@ -428,8 +428,12 @@ public void stop(BundleContext bc) throws Exception // Unregister transformation layer. // start listening for newly register or removed protocol providers bundleContext.removeServiceListener(this); - bundleContext.removeServiceListener(scOtrEngine); - bundleContext.removeServiceListener(otrContactManager); + + if(scOtrEngine != null) + bundleContext.removeServiceListener(scOtrEngine); + + if(otrContactManager != null) + bundleContext.removeServiceListener(otrContactManager); ServiceReference[] protocolProviderRefs; try