mot-agent: Fixed crash issue when we can't find target in MOT enabled dev list
authorSaurav Babu <saurav.babu@samsung.com>
Thu, 15 Mar 2018 10:08:29 +0000 (15:38 +0530)
committersaerome.kim <saerome.kim@samsung.com>
Mon, 2 Jul 2018 10:38:48 +0000 (19:38 +0900)
Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
src/mot-agent/ma-subowner.c

index ff2041c..a568b0b 100644 (file)
@@ -1645,7 +1645,8 @@ static void _make_devices_pair_func(ma_req_cb_s *con)
 
 PV_PAIR_END:
        /* Restore MOT enabled devices */
-       src_dev->next = next_dev ;
+       if (src_dev)
+               src_dev->next = next_dev ;
        /* Notify pair result  */
        net_ma_emit_pair_done(ma_dbus_get_object(), (int)ret);