OSDN Git Service

Do not merge.
authorPatrick Scott <phanna@android.com>
Wed, 15 Jul 2009 12:04:48 +0000 (08:04 -0400)
committerPatrick Scott <phanna@android.com>
Wed, 15 Jul 2009 15:58:43 +0000 (11:58 -0400)
Check for a null tab in onDestroy. This fix is in master but the crash appears
in donut as well.

src/com/android/browser/BrowserActivity.java

index e9ce8d5..f9c4dc9 100644 (file)
@@ -1195,8 +1195,10 @@ public class BrowserActivity extends Activity
         super.onDestroy();
         // Remove the current tab and sub window
         TabControl.Tab t = mTabControl.getCurrentTab();
-        dismissSubWindow(t);
-        removeTabFromContentView(t);
+        if (t != null) {
+            dismissSubWindow(t);
+            removeTabFromContentView(t);
+        }
         // Destroy all the tabs
         mTabControl.destroy();
         WebIconDatabase.getInstance().close();