Add NullPointer check
@@ -89,6 +89,7 @@ public class PaceCardHelper {
private PACEMarkerType getPaceMarkerFromCif(String pinType) {
CardInfoType cif = ctx.getRecognition().getCardInfo(NPA_TYPE);
+ if (cif != null) {
for (CardApplicationType app : cif.getApplicationCapabilities().getCardApplication()) {
for (DIDInfoType did : app.getDIDInfo()) {
if (pinType.equals(did.getDifferentialIdentity().getDIDName())) {
@@ -100,6 +101,7 @@ public class PaceCardHelper {
}
}
}
+ }
// nothing found, this means the code is just wrong
String msg = String.format("The requested DID=%s is not available in the nPA CIF.", pinType);
