Check if ParsedMainComponent is null before dereferencing

Bug: 240151494
Test: m
Change-Id: I2d225efa747df06cb7513d7ace84a06de67ee895
This commit is contained in:
John Wu
2022-09-26 21:32:36 +00:00
parent 1cc6b20282
commit f7e8fc97f9

View File

@@ -1129,7 +1129,7 @@ public class PackageManagerServiceUtils {
throw new IllegalArgumentException("Unsupported component type");
}
if (comp.getIntents().isEmpty()) {
if (comp == null || comp.getIntents().isEmpty()) {
continue;
}