Merge "Fix NPE when trying to add starting window"
diff --git a/services/core/java/com/android/server/wm/AppWindowContainerController.java b/services/core/java/com/android/server/wm/AppWindowContainerController.java
index 7630984..d2f604d 100644
--- a/services/core/java/com/android/server/wm/AppWindowContainerController.java
+++ b/services/core/java/com/android/server/wm/AppWindowContainerController.java
@@ -85,6 +85,9 @@
final Configuration mergedOverrideConfiguration;
synchronized (mWindowMap) {
+ if (mContainer == null) {
+ return;
+ }
startingData = mContainer.startingData;
mergedOverrideConfiguration = mContainer.getMergedOverrideConfiguration();
}
@@ -150,6 +153,9 @@
+ mContainer + ": startingWindow="
+ mContainer.startingWindow + " startingView="
+ mContainer.startingSurface);
+ if (mContainer == null) {
+ return;
+ }
if (mContainer.startingWindow != null) {
contents = mContainer.startingSurface;
token = mContainer.token;