e_compositor: Move assignment to be close to the use 65/315665/2
authorSeunghun Lee <shiin.lee@samsung.com>
Tue, 30 Jul 2024 06:26:51 +0000 (15:26 +0900)
committerJunSeok Kim <juns.kim@samsung.com>
Tue, 6 Aug 2024 05:17:12 +0000 (05:17 +0000)
Change-Id: I0b3a367108b16289d5c8618893732e6d837f67a4

src/bin/server/e_compositor.c

index f8f5d13..5daa935 100644 (file)
@@ -1564,14 +1564,13 @@ _e_subsurface_create(struct ds_subsurface *ds_subsurface, E_Surface *parent_surf
    if (!sub)
      return NULL;
 
-   surface = _e_surface_from_ds_surface(ds_subsurface->surface);
-
    if (parent_surface->base.remote_surface.onscreen_parent)
      {
         offscreen_parent = epc;
         epc = parent_surface->base.remote_surface.onscreen_parent;
      }
 
+   surface = _e_surface_from_ds_surface(ds_subsurface->surface);
    if (e_comp_wl_client_subsurface_cyclic_reference_check(surface->ec, epc))
      {
         ERR("Subsurface parent relationship is a cycle : "