e_comp_wl_data: fix dead code 35/322435/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Wed, 9 Apr 2025 04:56:01 +0000 (13:56 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Wed, 9 Apr 2025 05:24:25 +0000 (14:24 +0900)
Change-Id: I3a379e60ff3631a6e05f56b28da41ce5df4f6b0d
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
src/bin/server/e_comp_wl_data.c

index 381124119fdee7c1c8ad7dd43f58b42666938672..18684a7c2e07e9f951ea9393df8327aa7786ec08 100644 (file)
@@ -872,16 +872,18 @@ _e_comp_wl_data_device_selection_set(E_Comp_Wl_Data *comp_wl, E_Comp_Wl_Data_Sou
         if (focus)
           {
              data_device_res =  e_comp_wl_data_find_for_client(wl_resource_get_client(focus));
-             if ((data_device_res) && (source))
+             if (data_device_res)
                {
-                  offer_res =
-                     _e_comp_wl_data_device_data_offer_create(source,
-                                                              data_device_res);
-                  wl_data_device_send_selection(data_device_res, offer_res);
-
+                  if (source)
+                    {
+                       offer_res =
+                          _e_comp_wl_data_device_data_offer_create(source,
+                                                                   data_device_res);
+                       wl_data_device_send_selection(data_device_res, offer_res);
+                    }
+                  else
+                    wl_data_device_send_selection(data_device_res, NULL);
                }
-             else if (data_device_res)
-               wl_data_device_send_selection(data_device_res, NULL);
           }
 
         /* send wl_data_device@selection to data only clients