summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-06-22 09:56:48 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-06-22 09:56:48 -0700
commit6309c526e57454da6d0c5de93f2894c2ded3a1b1 (patch)
tree4f70c394d9b6a8bd221b2c688a1a426fd823ddf7 /src/com
parent7db8fb04183016406e20a63444fe94eec29a309a (diff)
parent73972695c844b25370ad738bb76e8eb2e9cd81e6 (diff)
downloadpackages_apps_Browser-6309c526e57454da6d0c5de93f2894c2ded3a1b1.zip
packages_apps_Browser-6309c526e57454da6d0c5de93f2894c2ded3a1b1.tar.gz
packages_apps_Browser-6309c526e57454da6d0c5de93f2894c2ded3a1b1.tar.bz2
am 73972695: Merge change 4925 into donut
Merge commit '73972695c844b25370ad738bb76e8eb2e9cd81e6' * commit '73972695c844b25370ad738bb76e8eb2e9cd81e6': Fix 2 NPEs in the Browser.
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/browser/BrowserActivity.java10
-rw-r--r--src/com/android/browser/TabControl.java5
2 files changed, 9 insertions, 6 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java
index d1d8d15..ef484b0 100644
--- a/src/com/android/browser/BrowserActivity.java
+++ b/src/com/android/browser/BrowserActivity.java
@@ -2187,10 +2187,12 @@ public class BrowserActivity extends Activity
final Animation.AnimationListener l =
new Animation.AnimationListener() {
public void onAnimationStart(Animation a) {
- mTabOverview.requestFocus();
- // Clear the listener so we don't trigger a tab
- // selection.
- mTabOverview.setListener(null);
+ if (mTabOverview != null) {
+ mTabOverview.requestFocus();
+ // Clear the listener so we don't trigger a tab
+ // selection.
+ mTabOverview.setListener(null);
+ }
}
public void onAnimationRepeat(Animation a) {}
public void onAnimationEnd(Animation a) {
diff --git a/src/com/android/browser/TabControl.java b/src/com/android/browser/TabControl.java
index f66df69..bdb57fa 100644
--- a/src/com/android/browser/TabControl.java
+++ b/src/com/android/browser/TabControl.java
@@ -712,8 +712,9 @@ class TabControl {
t = mTabQueue.get(i++);
} while (i < queueSize && t != null && t.mMainView == null);
- // Don't do anything if the last remaining tab is the current one.
- if (t == getCurrentTab()) {
+ // Don't do anything if the last remaining tab is the current one or if
+ // the last tab has been freed already.
+ if (t == getCurrentTab() || t.mMainView == null) {
return null;
}