Commit 73972695 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 4925 into donut

* changes:
  Fix 2 NPEs in the Browser.
parents edef6cce d068f801
......@@ -2112,10 +2112,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) {
......
......@@ -709,8 +709,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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment