[PATCH weston 2/2] input-panel: Fix show_input_panel_surface crash when no surface has focus
Derek Foreman
derekf at osg.samsung.com
Tue Oct 6 08:40:28 PDT 2015
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>
---
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
More information about the wayland-devel
mailing list