Missing null check

Bug: 17642023
Change-Id: I874b76e1e184a59dec714191d759c1045b7b9814
This commit is contained in:
John Reck
2014-09-25 08:33:05 -07:00
parent e1b032a840
commit ccf2fa0031

View File

@@ -434,11 +434,12 @@ public final class WindowManagerGlobal {
boolean hasVisibleWindows = false;
synchronized (mLock) {
for (int i = mRoots.size() - 1; i >= 0; --i) {
if (mRoots.get(i).getHostVisibility() == View.VISIBLE
&& mRoots.get(i).mAttachInfo.mHardwareRenderer != null) {
final ViewRootImpl root = mRoots.get(i);
if (root.mView != null && root.getHostVisibility() == View.VISIBLE
&& root.mAttachInfo.mHardwareRenderer != null) {
hasVisibleWindows = true;
} else {
mRoots.get(i).destroyHardwareResources();
root.destroyHardwareResources();
}
}
}