diff --git a/src/net/java/sip/communicator/service/protocol/ProtocolProviderFactory.java b/src/net/java/sip/communicator/service/protocol/ProtocolProviderFactory.java index deb221ffa..dc343b53f 100644 --- a/src/net/java/sip/communicator/service/protocol/ProtocolProviderFactory.java +++ b/src/net/java/sip/communicator/service/protocol/ProtocolProviderFactory.java @@ -266,8 +266,13 @@ protected void storePassword(BundleContext bundleContext, + " in package" + getFactoryImplPackageName()); //obscure the password - String mangledPassword - = new String(Base64.encode(password.getBytes())); + String mangledPassword = null; + + //if password is null then the caller simply wants the current password + //removed from the cache. make sure they don't get a null pointer + //instead. + if(password != null) + mangledPassword = new String(Base64.encode(password.getBytes())); //get a reference to the config service and store it. ServiceReference confReference