Fix NullPointer in VpnServiceBinder.checkStatus().

This commit is contained in:
Hung-ying Tyan
2009-07-18 10:20:10 +08:00
parent 8e3c3f6461
commit 000c3ff943

View File

@@ -71,9 +71,8 @@ public class VpnServiceBinder extends Service {
}
private synchronized void checkStatus(VpnProfile p) {
if (mService == null) broadcastConnectivity(p.getName(), VpnState.IDLE);
if (!p.getName().equals(mService.mProfile.getName())) {
if ((mService == null)
|| (!p.getName().equals(mService.mProfile.getName()))) {
broadcastConnectivity(p.getName(), VpnState.IDLE);
} else {
broadcastConnectivity(p.getName(), mService.getState());