1
0
Fork 0
mirror of https://github.com/M66B/NetGuard.git synced 2025-01-03 05:44:14 +00:00

Prevent crash

This commit is contained in:
M66B 2016-04-18 07:28:35 +02:00
parent 154a6baade
commit e33d221e5e

View file

@ -119,7 +119,7 @@ public class Receiver extends BroadcastReceiver {
// Get application info
PackageManager pm = context.getPackageManager();
String[] packages = pm.getPackagesForUid(uid);
if (packages.length < 1)
if (packages == null || packages.length < 1)
throw new PackageManager.NameNotFoundException(Integer.toString(uid));
boolean internet = Util.hasInternet(uid, context);