Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f84208fa authored by Romain Guy's avatar Romain Guy
Browse files

Prevent crash when invalidating all Views

Bug #7165793

A ViewRootImpl's root view can be null. Check for this condition to
prevent an NPE invalidateWorld(). Other messages perform a similar
check to properly handle the case where mView == null.

Change-Id: I5bcfc41c48a469d38b21be74df2f6c715b0f9352
parent 1a5efec6
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -2998,7 +2998,9 @@ public final class ViewRootImpl implements ViewParent,
                handleDispatchDoneAnimating();
            } break;
            case MSG_INVALIDATE_WORLD: {
                if (mView != null) {
                    invalidateWorld(mView);
                }
            } break;
            }
        }