Check appEntry is not null before dereferencing it

Bug: 183791632
Test: make

Change-Id: Ic731f40031dca806428ffe85d6f2d10465ce7dea
This commit is contained in:
Stefan Dierauf
2021-04-11 16:22:51 +00:00
committed by Beverly Tai
parent d62afd949e
commit e8d8d3dc85

View File

@@ -233,7 +233,7 @@ public class SystemUIToast implements ToastPlugin.Toast {
return null;
}
final AppEntry appEntry = appState.getEntry(packageName, userId);
if (appEntry.info == null
if (appEntry == null || appEntry.info == null
|| !ApplicationsState.FILTER_DOWNLOADED_AND_LAUNCHER.filterApp(appEntry)) {
return null;
}