e_comp_wl_rsm: Do not pass null wl_array 67/308267/1
authorSeunghun Lee <shiin.lee@samsung.com>
Wed, 20 Mar 2024 09:21:29 +0000 (18:21 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Wed, 20 Mar 2024 10:55:13 +0000 (19:55 +0900)
It is no longer available to pass a null wl_array since wayland@1.22.0.

Change-Id: Id86d93993e2d641b028c94440b0ba6ffd1f95c95

src/bin/e_comp_wl_rsm.c

index 90e4091..66f2507 100644 (file)
@@ -651,6 +651,7 @@ _remote_surface_changed_buff_protocol_send(E_Comp_Wl_Remote_Surface *rs,
 
         if (rs->version >= TIZEN_REMOTE_SURFACE_CHANGED_BUFFER_SINCE_VERSION)
           {
+             wl_array_init(&opts);
              if (rs->req_curr_buff.set)
                {
                   /* example of option list:
@@ -658,7 +659,6 @@ _remote_surface_changed_buff_protocol_send(E_Comp_Wl_Remote_Surface *rs,
                    *  [1] "257"
                    *  [2] "opt_none"
                    */
-                  wl_array_init(&opts);
                   p = wl_array_add(&opts, 21);
                   if (p) strncpy(p, "curr_buff_req_serial", 21);
 
@@ -686,7 +686,8 @@ _remote_surface_changed_buff_protocol_send(E_Comp_Wl_Remote_Surface *rs,
                                                       img_file_fd,
                                                       img_file_size,
                                                       e_util_timestamp_get(),
-                                                      add_opts ? &opts : NULL);
+                                                      &opts);
+             wl_array_release(&opts);
           }
         else
           tizen_remote_surface_send_update_buffer(rs->resource,
@@ -694,8 +695,6 @@ _remote_surface_changed_buff_protocol_send(E_Comp_Wl_Remote_Surface *rs,
                                                   e_util_timestamp_get());
      }
 
-   if (add_opts)
-     wl_array_release(&opts);
 
    return send;
 }