mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Avoid NPE when no resolver info is available
git-svn-id: https://zxing.googlecode.com/svn/trunk@2796 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
0e507c4b0c
commit
055d7b84de
|
@ -120,7 +120,7 @@ public final class CaptureActivityHandler extends Handler {
|
|||
ResolveInfo resolveInfo =
|
||||
activity.getPackageManager().resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY);
|
||||
String browserPackageName = null;
|
||||
if (resolveInfo.activityInfo != null) {
|
||||
if (resolveInfo != null && resolveInfo.activityInfo != null) {
|
||||
browserPackageName = resolveInfo.activityInfo.packageName;
|
||||
Log.d(TAG, "Using browser in package " + browserPackageName);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue