Fixes some IlligalStateExceptions and NPE when using icq protocol.

cusax-fix
Damian Minkov 14 years ago
parent 1a740bb1f2
commit 28cd9964db

@ -335,6 +335,10 @@ public void chatChanged(ChatPanel chatPanel)
while(contacts.hasNext())
{
Contact c = contacts.next();
if(!c.getProtocolProvider().isRegistered())
continue;
OperationSetServerStoredContactInfo infoOpSet =
c.getProtocolProvider().getOperationSet(
OperationSetServerStoredContactInfo.class);

@ -753,6 +753,10 @@ private void initButtonsPanel(UIContact uiContact)
while(contacts.hasNext() && !hasPhone)
{
Contact contact = contacts.next();
if(!contact.getProtocolProvider().isRegistered())
continue;
OperationSetServerStoredContactInfo infoOpSet =
contact.getProtocolProvider().getOperationSet(
OperationSetServerStoredContactInfo.class);

@ -423,7 +423,8 @@ private void loadTooltip(final ExtendedTooltip tip)
protocolContact.getProtocolProvider().getOperationSet(
OperationSetServerStoredContactInfo.class);
if(infoOpSet != null)
if(infoOpSet != null
&& protocolContact.getProtocolProvider().isRegistered())
{
Iterator<GenericDetail> details =
infoOpSet.requestAllDetailsForContact(protocolContact,

@ -154,9 +154,9 @@ protected List<GenericDetail> retrieveDetails(String uin)
result = new LinkedList<GenericDetail>();
// put even empty result to bypass further retrieve
retreivedDetails.put(uin, responseRetriever.result);
retreivedDetails.put(uin, result);
return responseRetriever.result;
return result;
}
/**

Loading…
Cancel
Save