01_SDK/nimble/host/nimble/nimble/host/src/ble_sm.c
@@ -40,6 +40,7 @@
 *      o A proc entry is read from or written to.
 *      o The proc list is read or modified.
 */
#pragma diag_suppress 111
#include <string.h>
#include <errno.h>
@@ -2913,7 +2914,11 @@
    int rc;
    handle = ble_l2cap_get_conn_handle(chan);
#if NIMBLE_BUG_FIXED_EN
    if(handle == BLE_HS_CONN_HANDLE_NONE){
#else
    if (!handle) {
#endif
        return BLE_HS_ENOTCONN;
    }