
The peer objmgr pointer in the if_mgr_roam module may be NULL if there is no peer connected. Add check to see if pointer is NULL before dereferencing it. Also modify logic to only check if the vdev is in STA or P2P_CLI mode. Change-Id: I7370ca5b9c74bd81f6e958cf740b6ee426f4faad CRs-fixed: 2779831