e_client: Ensure `e_client_view_get` never fails 51/321051/1
authorSeunghun Lee <shiin.lee@samsung.com>
Thu, 13 Mar 2025 06:20:15 +0000 (15:20 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Thu, 13 Mar 2025 09:32:18 +0000 (18:32 +0900)
The following pattern has been widely used:

`e_view_client_view_get(e_client_view_get(ec));`

If the given parameter to `e_view_client_view_get` is null, it will
abort.
To maintain the above pattern, the inner call as a parameter of
`e_view_client_view` must not return null.
This patch ensures that `e_client_view_get` never returns null.

Change-Id: Ie5aa7a7adc3bef2311cbf40cf15b8fa3f84c43e7

src/bin/core/e_client.c

index d9f3c9849c7f57fee0564f4ff0fb0d354ce11ebd..03aa606cf7ba698ab9706a5e4373ffde0d8acce0 100644 (file)
@@ -5876,9 +5876,6 @@ e_client_base_output_resolution_desk_useful_geometry_get(E_Client *ec, int *x, i
 E_API E_View_Client *
 e_client_view_get(E_Client *ec)
 {
-   E_OBJECT_CHECK_RETURN(ec, NULL);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(PRI(ec)->view_client, NULL);
-
    return PRI(ec)->view_client;
 }