e_client: fix the dereferenced data 92/246592/1
authorSooChan Lim <sc1.lim@samsung.com>
Mon, 2 Nov 2020 08:51:58 +0000 (17:51 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 2 Nov 2020 08:51:58 +0000 (17:51 +0900)
Change-Id: I2bc1cfe11eaa80b96b27086dfffd194c934e5b90

src/bin/e_client.c

index b5f4b773883504e3b36b68a04e1be7b086146ed0..e13143f45d520379e08cbf6d173dfe4dbb91e8b5 100644 (file)
@@ -7672,14 +7672,13 @@ e_client_base_output_resolution_update(E_Client *ec)
   if (!e_config->configured_output_resolution.use) return EINA_TRUE;
   if (ec->base_output_resolution.use) return EINA_TRUE;
 
-  cdata = e_client_cdata_get(ec);
-
   /* Check whether it's subsurface or not
    * The resolution of subsurface will follow the resolution of its toplevel surface.
    * Transform for subsurface will be applied when toplevel surface does by
    * implementation of e_client_transform_core.
    */
-  if (cdata->sub.data) return EINA_FALSE;
+  cdata = e_client_cdata_get(ec);
+  if (cdata && cdata->sub.data) return EINA_FALSE;
 
   configured_width = e_config->configured_output_resolution.w;
   configured_height = e_config->configured_output_resolution.h;