mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-04-27 07:10:54 +02:00
libweston-desktop: Fix weston crash when lost the shsurf
The shell_surface may disappear when keyboard lost focus, then the shsurf will be NULL. Have an ahead check for shsurf before calling the callback in weston_desktop_surface_foreach_child. Fixes #811 Tested-by: Erkai Ji <erkai.ji@nxp.com> Signed-off-by: Wujian Sun <wujian.sun_1@nxp.com> Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
parent
31a9a4831f
commit
042d02f422
1 changed files with 4 additions and 2 deletions
|
|
@ -892,6 +892,8 @@ weston_desktop_surface_foreach_child(struct weston_desktop_surface *surface,
|
|||
{
|
||||
struct weston_desktop_surface *child;
|
||||
|
||||
wl_list_for_each(child, &surface->children_list, children_link)
|
||||
callback(child, user_data);
|
||||
wl_list_for_each(child, &surface->children_list, children_link) {
|
||||
if (weston_desktop_surface_get_user_data(child))
|
||||
callback(child, user_data);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue