Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba5065ea authored by Irfan Sheriff's avatar Irfan Sheriff
Browse files

Fix NPE while creating autonomous GO

When autonomous GO is being created and we get a device lost event,
fix NPE

Bug: 6595978
Change-Id: Id93b693b8bcc447aea03c04be7556b1f2ff00a90
parent a3489c50
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -897,7 +897,11 @@ public class WifiP2pService extends IWifiP2pManager.Stub {
                    break;
                case WifiMonitor.P2P_DEVICE_LOST_EVENT:
                    WifiP2pDevice device = (WifiP2pDevice) message.obj;
                    if (!mSavedPeerConfig.deviceAddress.equals(device.deviceAddress)) {

                    // If we lose a device during an autonomous group creation,
                    // mSavedPeerConfig can be empty
                    if (mSavedPeerConfig != null &&
                            !mSavedPeerConfig.deviceAddress.equals(device.deviceAddress)) {
                        // Do the regular device lost handling
                        ret = NOT_HANDLED;
                        break;