After unplug bluetooth adapter, the code will run into the bool PeripheralBase::_attemp_connect() function. However, the pointer device_ could be an empty pointer which leads to crash.
I've tryed to add logic below and can fix the bug.
if ( nullptr == device_ ) { return false; }
After unplug bluetooth adapter, the code will run into the
bool PeripheralBase::_attemp_connect()
function. However, the pointerdevice_
could be an empty pointer which leads to crash.I've tryed to add logic below and can fix the bug.
if ( nullptr == device_ ) { return false; }