null check before dereference

Change-Id: I6ae219b68920c160e104b307f60802fd75e705ce
Fixes: 62908319
Test: Manual
This commit is contained in:
Todd Kennedy
2017-06-26 07:51:54 -07:00
parent ba003a97f8
commit 7833e7c5cb

View File

@@ -19944,7 +19944,7 @@ public class PackageManagerService extends IPackageManager.Stub
// Queue up an async operation since the package deletion may take a little while.
mHandler.post(new Runnable() {
public void run() {
final PackageSetting ps = (PackageSetting) pkg.mExtras;
final PackageSetting ps = pkg == null ? null : (PackageSetting) pkg.mExtras;
boolean doClearData = true;
if (ps != null) {
final boolean targetIsInstantApp =