mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-11-05 18:24:04 +00:00
window: Avoid setting an invalid surface for the pointer
If we failed to load the pointer image to the surface then do not create a buffer from a NULL surface and do not attach that to the device.
This commit is contained in:
parent
21223bf6d1
commit
8bd35c7770
1 changed files with 4 additions and 0 deletions
|
@ -1176,6 +1176,10 @@ set_pointer_image(struct input *input, uint32_t time, int pointer)
|
|||
|
||||
input->current_pointer_image = pointer;
|
||||
surface = display->pointer_surfaces[pointer];
|
||||
|
||||
if (!surface)
|
||||
return;
|
||||
|
||||
buffer = display_get_buffer_for_surface(display, surface);
|
||||
wl_input_device_attach(input->input_device, time, buffer,
|
||||
pointer_images[pointer].hotspot_x,
|
||||
|
|
Loading…
Reference in a new issue