diff options
author | Sven Gothel <[email protected]> | 2020-10-25 10:29:20 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-10-25 10:29:20 +0100 |
commit | bcff1398d72ef2a03fc08f3b4c47a5ae2eee656c (patch) | |
tree | cfaee2ef1e3baeead87dfe7bf2b8231a7d295549 /src | |
parent | 21be64f828fa0464d36ffc15a133134e076a63a1 (diff) |
DBTAdapter::close(): Don't use mgmt reference if !valid
Diffstat (limited to 'src')
-rw-r--r-- | src/direct_bt/DBTAdapter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/direct_bt/DBTAdapter.cpp b/src/direct_bt/DBTAdapter.cpp index c1df37c3..23651219 100644 --- a/src/direct_bt/DBTAdapter.cpp +++ b/src/direct_bt/DBTAdapter.cpp @@ -248,7 +248,7 @@ void DBTAdapter::close() noexcept { keep_le_scan_alive = false; // mute all listener first - { + if( isValid() ) { int count = mgmt.removeMgmtEventCallback(dev_id); DBG_PRINT("DBTAdapter::close removeMgmtEventCallback: %d callbacks", count); } |