mirror of
https://github.com/zxing/zxing.git
synced 2024-11-10 04:54:04 -08:00
Fix two rare crashes from bad input / state
This commit is contained in:
parent
55b7c3e763
commit
e0ea32f217
|
@ -46,7 +46,7 @@ final class BookmarkAdapter extends BaseAdapter {
|
|||
|
||||
@Override
|
||||
public int getCount() {
|
||||
return cursor.getCount();
|
||||
return cursor.isClosed() ? 0 : cursor.getCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -41,7 +41,11 @@ public final class EmailAddressResultParser extends ResultParser {
|
|||
if (queryStart >= 0) {
|
||||
hostEmail = hostEmail.substring(0, queryStart);
|
||||
}
|
||||
try {
|
||||
hostEmail = urlDecode(hostEmail);
|
||||
} catch (IllegalArgumentException iae) {
|
||||
return null;
|
||||
}
|
||||
String[] tos = null;
|
||||
if (!hostEmail.isEmpty()) {
|
||||
tos = COMMA.split(hostEmail);
|
||||
|
|
Loading…
Reference in a new issue