Fix oal_bt_deinit crash issue 34/188634/2
authorWootak Jung <wootak.jung@samsung.com>
Fri, 7 Sep 2018 02:18:50 +0000 (11:18 +0900)
committerPyun DoHyun <dh79.pyun@samsung.com>
Fri, 7 Sep 2018 05:11:26 +0000 (05:11 +0000)
Change-Id: I67bd8b537358e1f22f33490320d0b4e1e691bb23

bt-oal/oal-manager.c

index 87b4869..56b821f 100644 (file)
@@ -84,8 +84,10 @@ oal_status_t oal_bt_init(oal_event_callback cb)
 void oal_bt_deinit(void)
 {
        BT_INFO("+");
-       blued_api->cleanup();
-       blued_api = NULL;
+       if (blued_api) {
+               blued_api->cleanup();
+               blued_api = NULL;
+       }
        _bt_event_dispatcher_deinit();
        sleep(1);
        unload_libs(NULL);