Check for null display in DisplayController onDisplayAdded

Bug: 415007177
Test: local + presubmit
Flag: EXEMPT bugfix
Change-Id: Ic4e9e6156ed565ed86aa25ebbdeda853fb2d8eda
This commit is contained in:
Will Osborn
2025-05-08 12:39:20 +00:00
parent 2a6553ff9e
commit 19392fc5cf
@@ -168,7 +168,10 @@ public class DisplayController implements DesktopVisibilityListener {
new DisplayManager.DisplayListener() {
@Override
public void onDisplayAdded(int displayId) {
getOrCreatePerDisplayInfo(displayManager.getDisplay(displayId));
Display display = displayManager.getDisplay(displayId);
if (display != null) {
getOrCreatePerDisplayInfo(display);
}
}
@Override