adapter: Fix crash issue 28/319028/1 accepted/tizen/7.0/unified/20241014.165024
authorWootak Jung <wootak.jung@samsung.com>
Thu, 10 Oct 2024 04:29:50 +0000 (13:29 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Mon, 14 Oct 2024 00:43:26 +0000 (09:43 +0900)
Change-Id: Icf5e484ae079c559d90cbd7cbdecfbede9ad6868
Signed-off-by: Wootak Jung <wootak.jung@samsung.com>
src/adapter.c

index 60e9818ffe9d8e76a71792deeeed51b6173f6a3a..b12eccda3a71a32777eb10993c08192a838b9034 100644 (file)
@@ -13616,6 +13616,10 @@ static void multi_adv_state_change_callback(uint16_t index, uint16_t length,
                ev->adv_instance, ev->state_change_reason, ev->connection_handle);
 
        adv = find_advertiser(adapter, ev->adv_instance);
+       if (!adv) {
+               DBG("Unable to find advertiser");
+               return;
+       }
        DBG("current advertising status %d", adv->status);
 
        if ((ev->adv_instance > 0 && ev->adv_instance < adapter_le_get_max_adv_instance()) &&