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

Commit 850a4c66 authored by Adam Powell's avatar Adam Powell Committed by Android (Google) Code Review
Browse files

Merge "Fix bug 3198503 - NPE at MenuPopupHelper.dismiss"

parents 75663cee ed8b403c
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -110,9 +110,11 @@ public class MenuPopupHelper implements AdapterView.OnItemClickListener, View.On
        if (isShowing()) {
        if (isShowing()) {
            mPopup.dismiss();
            mPopup.dismiss();
        }
        }
        if (mTreeObserver != null) {
            mTreeObserver.removeGlobalOnLayoutListener(this);
            mTreeObserver.removeGlobalOnLayoutListener(this);
            mTreeObserver = null;
            mTreeObserver = null;
        }
        }
    }


    public boolean isShowing() {
    public boolean isShowing() {
        return mPopup != null && mPopup.isShowing();
        return mPopup != null && mPopup.isShowing();