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