diff options
author | Michel Dänzer <mdaenzer@redhat.com> | 2020-07-23 19:14:28 +0200 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2020-08-18 04:12:09 +0000 |
commit | 4a65b6617ecc43b754885894f6575fb7dc4bb74d (patch) | |
tree | b2fe866f8d99c5111ccad7957a5c3d9ac94c1fd9 /hw | |
parent | 10cabe0b978677cfac4bfb405295a16ee8eedb34 (diff) |
xwayland: Handle NULL xwl_seat in xwl_seat_can_emulate_pointer_warp
This can happen e.g. with weston's headless backend.
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
(cherry picked from commit e33453f9111b21e4814d628e6ae00bc7b200f404)
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xwayland/xwayland-input.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c index 9b3b46ba7..a05d178ff 100644 --- a/hw/xwayland/xwayland-input.c +++ b/hw/xwayland/xwayland-input.c @@ -2783,11 +2783,16 @@ xwl_seat_create_pointer_warp_emulator(struct xwl_seat *xwl_seat) static Bool xwl_seat_can_emulate_pointer_warp(struct xwl_seat *xwl_seat) { - struct xwl_screen *xwl_screen = xwl_seat->xwl_screen; + struct xwl_screen *xwl_screen; + + if (!xwl_seat) + return FALSE; if (!xwl_seat->pointer) return FALSE; + xwl_screen = xwl_seat->xwl_screen; + if (!xwl_screen->relative_pointer_manager) return FALSE; |