e_comp_wl_data: Add NULL check before use new_offer 36/298736/1
authorJunseok Kim <juns.kim@samsung.com>
Wed, 13 Sep 2023 04:44:01 +0000 (13:44 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Wed, 13 Sep 2023 05:36:33 +0000 (14:36 +0900)
Change-Id: I35e26d2f283f5434b8db5f1e82ca6573e3ca6cdc

src/bin/e_comp_wl_data.c

index 0330df2..2a7b011 100644 (file)
@@ -1122,9 +1122,12 @@ e_comp_wl_data_device_send_enter(E_Client *ec)
 
         new_offer = wl_resource_get_user_data(offer_res);
         e_comp_wl->drag_offer = new_offer;
-        _e_comp_wl_data_offer_update_action(new_offer);
-        if (wl_resource_get_version(offer_res) >= WL_DATA_OFFER_SOURCE_ACTIONS_SINCE_VERSION)
-          wl_data_offer_send_source_actions(offer_res, new_offer->source->dnd_actions);
+        if (new_offer)
+          {
+             _e_comp_wl_data_offer_update_action(new_offer);
+             if (wl_resource_get_version(offer_res) >= WL_DATA_OFFER_SOURCE_ACTIONS_SINCE_VERSION)
+               wl_data_offer_send_source_actions(offer_res, new_offer->source->dnd_actions);
+          }
      }
 
    e_comp_wl->selection.target = ec;