mirror of
https://github.com/zxing/zxing.git
synced 2024-11-09 20:44:03 -08:00
Avoid a rare NPE
git-svn-id: https://zxing.googlecode.com/svn/trunk@2650 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
c835ed3be6
commit
b8e5a6ed67
|
@ -82,7 +82,7 @@ public final class AddressBookResultHandler extends ResultHandler {
|
|||
super(activity, result);
|
||||
AddressBookParsedResult addressResult = (AddressBookParsedResult) result;
|
||||
String[] addresses = addressResult.getAddresses();
|
||||
boolean hasAddress = addresses != null && addresses.length > 0 && addresses[0].length() > 0;
|
||||
boolean hasAddress = addresses != null && addresses.length > 0 && addresses[0] != null && addresses[0].length() > 0;
|
||||
String[] phoneNumbers = addressResult.getPhoneNumbers();
|
||||
boolean hasPhoneNumber = phoneNumbers != null && phoneNumbers.length > 0;
|
||||
String[] emails = addressResult.getEmails();
|
||||
|
|
Loading…
Reference in a new issue