Fix NPE when trying to add starting window

Container may already have been removed, so protect against that
situation.

Test: Boot device
Change-Id: Ic76d74c6df0801e2a50352a4b04d67b5d216d4fe
Fixes: 34227241
This commit is contained in:
Jorim Jaggi
2017-01-12 13:54:40 +01:00
parent a5db0b90d9
commit 73f8820ccc

View File

@@ -85,6 +85,9 @@ public class AppWindowContainerController
final Configuration mergedOverrideConfiguration;
synchronized (mWindowMap) {
if (mContainer == null) {
return;
}
startingData = mContainer.startingData;
mergedOverrideConfiguration = mContainer.getMergedOverrideConfiguration();
}
@@ -150,6 +153,9 @@ public class AppWindowContainerController
+ mContainer + ": startingWindow="
+ mContainer.startingWindow + " startingView="
+ mContainer.startingSurface);
if (mContainer == null) {
return;
}
if (mContainer.startingWindow != null) {
contents = mContainer.startingSurface;
token = mContainer.token;