Merge "Fix crash when docking." into nyc-dev
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index 0764ff4..f7c0b4c 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -3479,7 +3479,9 @@
// the decor view we have to notify the view root that the
// callbacks may have changed.
ViewRootImpl impl = decor.getViewRootImpl();
- impl.notifyChildRebuilt();
+ if (impl != null) {
+ impl.notifyChildRebuilt();
+ }
}
if (a.mVisibleFromClient && !a.mWindowAdded) {
a.mWindowAdded = true;