Guard null nfcSession on disconnect
@@ -143,10 +143,12 @@ public final class IOSNFCCard extends AbstractNFCCard {
@Override
public void disconnect(boolean reset) throws SCIOException {
+ if (this.nfcSession != null) {
this.nfcSession.invalidateSession();
this.nfcSession = null;
this.setTag(null);
}
+ }
@Override
public boolean isTagPresent() {
