Fix bug 3248786 - silly monkeys.
Change-Id: I41306cae06a7b4fd3852e0760ae668c8d6eacc5d
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 0a2e031..a0a6b42 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -2363,7 +2363,11 @@
*/
public boolean onMenuOpened(int featureId, Menu menu) {
if (featureId == Window.FEATURE_ACTION_BAR) {
- mActionBar.dispatchMenuVisibilityChanged(true);
+ if (mActionBar != null) {
+ mActionBar.dispatchMenuVisibilityChanged(true);
+ } else {
+ Log.e(TAG, "Tried to open action bar menu with no action bar");
+ }
}
return true;
}