From: Seunghun Lee Date: Fri, 28 Mar 2025 03:13:39 +0000 (+0900) Subject: surface_view: Remove assert and return null for invalid case X-Git-Tag: accepted/tizen/unified/20250401.113859~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ede01a175473afb3ff3c8523166dfa376359a2fd;p=platform%2Fupstream%2Fenlightenment.git surface_view: Remove assert and return null for invalid case It turns out that E_Client for launchscreen can be used for surface. We discovered this while testing splash functionality with e_tizen_unittests: ``` $ e_tizen_unittests --gtest_filter=etTestSplash* ``` We cannot reuse this launchscreen E_Client for the newly created surface. Change-Id: I6e9787acd177f87ff1b4c99b6b5aeba260bd459a --- diff --git a/src/bin/server/e_surface_view.c b/src/bin/server/e_surface_view.c index e1f7e80217..8664ee6479 100644 --- a/src/bin/server/e_surface_view.c +++ b/src/bin/server/e_surface_view.c @@ -243,7 +243,11 @@ _launchscreen_ec_find(struct wl_resource *surface_resource) if (!launchscreen_ec) return NULL; - assert(launchscreen_ec->comp_data == NULL); + if (e_surface_try_from_ec(launchscreen_ec)) + { + ESV_INF("The launchscreen ec is already used for another surface view.", launchscreen_ec); + return NULL; + } e_comp_launchscrn_ec_remove(launchscreen_ec);