Manual merge of 553cec66f736052535390b29531e8602bc4cab23 to oc-release

master has diverged too far.

Bug: 34227241
Tests:  Code inspection & compiles
Change-Id: I965414592270533dae709b740089d04b43c45331
diff --git a/services/core/java/com/android/server/wm/AppWindowContainerController.java b/services/core/java/com/android/server/wm/AppWindowContainerController.java
index 7630984..8fba404 100644
--- a/services/core/java/com/android/server/wm/AppWindowContainerController.java
+++ b/services/core/java/com/android/server/wm/AppWindowContainerController.java
@@ -150,6 +150,9 @@
                     + mContainer + ": startingWindow="
                     + mContainer.startingWindow + " startingView="
                     + mContainer.startingSurface);
+            if (mContainer == null) {
+                return;
+            }
             if (mContainer.startingWindow != null) {
                 contents = mContainer.startingSurface;
                 token = mContainer.token;