[PATCH weston 2/2] input-panel: Fix show_input_panel_surface crash when no surface has focus

Bryce Harrington bryce at osg.samsung.com
Wed Oct 7 17:12:58 PDT 2015


On Tue, Oct 06, 2015 at 10:40:28AM -0500, Derek Foreman wrote:
> From: Nicolas Guyomard <nicolas.guyomard at open.eurogiciel.org>
> 
> Signed-off-by: Nicolas Guyomard <nicolas.guyomard at open.eurogiciel.org>
> Signed-off-by: Derek Foreman <derekf at osg.samsung.com>

Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>

> ---
>  desktop-shell/input-panel.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/desktop-shell/input-panel.c b/desktop-shell/input-panel.c
> index 251d044..95d6287 100644
> --- a/desktop-shell/input-panel.c
> +++ b/desktop-shell/input-panel.c
> @@ -74,6 +74,8 @@ show_input_panel_surface(struct input_panel_surface *ipsurf)
>  		if (!keyboard || !keyboard->focus)
>  			continue;
>  		focus = weston_surface_get_main_surface(keyboard->focus);
> +		if (!focus)
> +			continue;
>  		ipsurf->output = focus->output;
>  		x = ipsurf->output->x + (ipsurf->output->width - ipsurf->surface->width) / 2;
>  		y = ipsurf->output->y + ipsurf->output->height - ipsurf->surface->height;
> -- 
> 2.5.3
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list