/* get the client for this resource */
if ((ec = wl_resource_get_user_data(resource)))
{
- if (ec->comp_data)
- ec->comp_data->shell.surface = NULL;
+ if (!ec->comp_data)
+ return;
- if (!e_object_unref(E_OBJECT(ec))) return;
- if (e_object_is_del(E_OBJECT(ec))) return;
-
- if (ec->comp_data)
+ if ((e_object_unref(E_OBJECT(ec))) &&
+ (!e_object_is_del(E_OBJECT(ec))))
{
if (ec->comp_data->mapped)
{
if (ec->parent)
{
ec->parent->transients =
- eina_list_remove(ec->parent->transients, ec);
+ eina_list_remove(ec->parent->transients, ec);
}
/* wl_resource_destroy(ec->comp_data->shell.surface); */
}
+ ec->comp_data->shell.surface = NULL;
}
}