summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorLeon Scroggins <scroggo@google.com>2009-07-31 13:10:55 -0400
committerLeon Scroggins <scroggo@google.com>2009-07-31 13:10:55 -0400
commit5bbe98025a2c606a35c91b826760020890daadb1 (patch)
tree99ca7cc922260f916d3d31f71b82a75842d0dfb4 /src/com
parent0a1a1a1bf6198a91cbb30191d1aab907f76057c0 (diff)
downloadpackages_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.java2
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;