OSDN Git Service

Fix 2 NPEs in the Browser.
authorPatrick Scott <phanna@android.com>
Mon, 22 Jun 2009 15:46:06 +0000 (11:46 -0400)
committerPatrick Scott <phanna@android.com>
Mon, 22 Jun 2009 15:46:06 +0000 (11:46 -0400)
commitd068f8015daa84296463fcc0420e40e35e40fe7d
treede47259a26183eaacf691f964ab9623c0876d108
parentd8b0ad28ce8a3a6b5dfab954e4f7aa7b0af2674f
Fix 2 NPEs in the Browser.

The first was from freeMemory getting a tab back that had already been freed.
This is a really hard case to reproduce but it appears that it can happen. So
just check for a null mMainView before trying to free the tab.

The second was a null mTabOverview during the onAnimationStart method when
animating to the tab overview. I think this is caused by message delays not
being accurate enough to ensure the overview has been created. A check for null
fixes the problem for now but I am working on a better solution to ensure
animation message order.
src/com/android/browser/BrowserActivity.java
src/com/android/browser/TabControl.java