summaryrefslogtreecommitdiff
path: root/desktop-shell
diff options
context:
space:
mode:
authorNicolas Guyomard <nicolas.guyomard@open.eurogiciel.org>2015-10-06 10:40:28 -0500
committerBryce Harrington <bryce@osg.samsung.com>2015-10-07 17:13:17 -0700
commit4845354cfad33dbc6ef5c3bd3c1d3757a0522088 (patch)
treeccbc50e3d3fc30ddc672bd61e55acd2f52b0a219 /desktop-shell
parenta1519753472ead2a1a0cb5c2e9be3f1993c21283 (diff)
input-panel: Fix show_input_panel_surface crash when no surface has focus
Signed-off-by: Nicolas Guyomard <nicolas.guyomard@open.eurogiciel.org> Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
Diffstat (limited to 'desktop-shell')
-rw-r--r--desktop-shell/input-panel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/desktop-shell/input-panel.c b/desktop-shell/input-panel.c
index 251d0449..95d62873 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;