OSDN Git Service

check to see if the real title bar has no parent
authorCary Clark <cary@android.com>
Mon, 28 Sep 2009 21:05:06 +0000 (17:05 -0400)
committerCary Clark <cary@android.com>
Mon, 28 Sep 2009 21:12:38 +0000 (17:12 -0400)
This works around a monkey-found crash that is unlikely to
be triggerable by a user.

Fixes http://b/issue?id=2150746

src/com/android/browser/BrowserActivity.java

index babb43c..589fff0 100644 (file)
@@ -1071,6 +1071,9 @@ public class BrowserActivity extends Activity
      * context menu.
      */
     /* package */ void showTitleBarContextMenu() {
+        if (null == mTitleBar.getParent()) {
+            return;
+        }
         openContextMenu(mTitleBar);
     }