Fixes NullPointerException for contacts that don't have preferred protocol provider.

cusax-fix
Yana Stamcheva 14 years ago
parent ee908cba05
commit d955f59d19

@ -172,7 +172,9 @@ public Iterator<String> getLabels()
public ProtocolProviderService getPreferredProtocolProvider(
Class<? extends OperationSet> opSetClass)
{
return preferredProviders.get(opSetClass);
if (preferredProviders != null)
return preferredProviders.get(opSetClass);
return null;
}
/**
@ -203,7 +205,9 @@ public void addPreferredProtocolProvider(
*/
public String getPreferredProtocol(Class<? extends OperationSet> opSetClass)
{
return preferredProtocols.get(opSetClass);
if (preferredProtocols != null)
return preferredProtocols.get(opSetClass);
return null;
}
/**

Loading…
Cancel
Save