summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Robert Greenwalt <rgreenwalt@google.com> 2011-07-29 10:03:37 -0700
committer Robert Greenwalt <rgreenwalt@google.com> 2011-07-29 10:03:37 -0700
commitfde1eb7cf88e488d619d3168f83fb2e740d39296 (patch)
tree613e990648bc9f0c204e19679a9490e81afc1985
parentd20f60c8a71ca0aa853bc433f74b32dcfc98f984 (diff)
Fix NPE when going from proxy to no proxy.
bug:5081431 Change-Id: I68a8cca94e4612bd9ee2faf1123e0b63dc25b833
-rw-r--r--services/java/com/android/server/ConnectivityService.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index 8ad9f91ab2a4..c9ab806dfb24 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -2299,7 +2299,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
synchronized (this) {
if (mDefaultProxy != null && mDefaultProxy.equals(proxy)) return;
if (mDefaultProxy == proxy) return;
- if (!TextUtils.isEmpty(proxy.getHost())) {
+ if (proxy != null && !TextUtils.isEmpty(proxy.getHost())) {
mDefaultProxy = proxy;
} else {
mDefaultProxy = null;