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

Commit dc725fe9 authored by Craig Mautner's avatar Craig Mautner
Browse files

Add null check to StackBox containment test.

Relies on mFirst and mSecond being non-null exactly when mStack is
null.

Fixes bug 9774735.

Change-Id: Ib0b463560b4bf69fdf05afe61ebe94ea0034a3ad
parent acb837fe
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -109,8 +109,8 @@ public class StackBox {
     * @return true if the specified StackBox matches this or one of its descendants.
     */
    boolean contains(int stackBoxId) {
        return mStackBoxId == stackBoxId || mFirst.contains(stackBoxId)
                || mSecond.contains(stackBoxId);
        return mStackBoxId == stackBoxId ||
                (mStack == null &&  (mFirst.contains(stackBoxId) || mSecond.contains(stackBoxId)));
    }

    /**