fix npe sending relay invites to self

Needed to handle the case where both are null. Can't reproduce this in
release builds so likely doesn't justify a new release.
This commit is contained in:
Eric House 2019-05-21 13:18:27 -07:00
parent b63ba3e843
commit 78f1ba6dde

View file

@ -204,7 +204,14 @@ abstract class XWJIService extends JobIntentService {
Object obj1 = bundle1.get( key );
Object obj2 = bundle2.get( key );
if ( obj1.getClass() != obj2.getClass() ) {
if ( obj1 == obj2 ) { // catches case where both null
continue;
} else if ( obj1 == null || obj2 == null ) {
equal = false;
break;
}
if ( obj1.getClass() != obj2.getClass() ) { // NPE
equal = false;
break;
}