Merge "Fix bug 5189070 - Don't try to show overflow popups for nonexistant menus"

This commit is contained in:
Adam Powell
2011-08-22 16:35:44 -07:00
committed by Android (Google) Code Review

View File

@@ -252,7 +252,7 @@ public class ActionMenuPresenter extends BaseMenuPresenter {
* @return true if the overflow menu was shown, false otherwise.
*/
public boolean showOverflowMenu() {
if (mReserveOverflow && !isOverflowMenuShowing() && mMenuView != null &&
if (mReserveOverflow && !isOverflowMenuShowing() && mMenu != null && mMenuView != null &&
mPostedOpenRunnable == null) {
OverflowPopup popup = new OverflowPopup(mContext, mMenu, mOverflowButton, true);
mPostedOpenRunnable = new OpenOverflowRunnable(popup);