Fixes NPEs when provider is missing OperationSetMultiUserChat.

cusax-fix
Damian Minkov 12 years ago
parent e0e0cf4921
commit 217453c30b

@ -509,7 +509,8 @@ private void init()
&& authOpSet.getSubscriptionStatus(contact) != null
&& !authOpSet.getSubscriptionStatus(contact)
.equals(SubscriptionStatus.Subscribed)
&& !opSetMUC.isPrivateMessagingContact(contactAddress))
&& (opSetMUC == null
|| !opSetMUC.isPrivateMessagingContact(contactAddress)))
{
if (firstUnsubscribedContact == null)
firstUnsubscribedContact = contact;
@ -715,8 +716,8 @@ else if (authRequestItemCount == 1
&& defaultContact.getProtocolProvider()
.getOperationSet(OperationSetExtendedAuthorizations.class)
!= null
&& !opSetMUC.isPrivateMessagingContact(
defaultContact.getAddress()))
&& (opSetMUC == null || !opSetMUC.isPrivateMessagingContact(
defaultContact.getAddress())))
&& !SubscriptionStatus.Subscribed
.equals(defaultContact.getProtocolProvider()
.getOperationSet(

Loading…
Cancel
Save