diff options
author | Leon Scroggins <scroggo@google.com> | 2009-07-31 13:10:55 -0400 |
---|---|---|
committer | Leon Scroggins <scroggo@google.com> | 2009-07-31 13:10:55 -0400 |
commit | 5bbe98025a2c606a35c91b826760020890daadb1 (patch) | |
tree | 99ca7cc922260f916d3d31f71b82a75842d0dfb4 /src/com | |
parent | 0a1a1a1bf6198a91cbb30191d1aab907f76057c0 (diff) | |
download | packages_apps_Browser-5bbe98025a2c606a35c91b826760020890daadb1.zip packages_apps_Browser-5bbe98025a2c606a35c91b826760020890daadb1.tar.gz packages_apps_Browser-5bbe98025a2c606a35c91b826760020890daadb1.tar.bz2 |
Fix a monkey crash.
Since getTopWindow() can be null, check first before accessing it.
Fix for http://b/issue?id=2027301
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/browser/BrowserActivity.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java index c4c8d33..66832ed 100644 --- a/src/com/android/browser/BrowserActivity.java +++ b/src/com/android/browser/BrowserActivity.java @@ -1555,7 +1555,7 @@ public class BrowserActivity extends Activity */ @Override public boolean onSearchRequested() { - String url = getTopWindow().getUrl(); + String url = (getTopWindow() == null) ? null : getTopWindow().getUrl(); startSearch(mSettings.getHomePage().equals(url) ? null : url, true, createGoogleSearchSourceBundle(GOOGLE_SEARCH_SOURCE_SEARCHKEY), false); return true; |