[PATCH weston] compositor: Bail out if prev is NULL in clip_pointer_motion()
Kristian Høgsberg
hoegsberg at gmail.com
Mon May 14 06:44:58 PDT 2012
On Sun, May 13, 2012 at 12:45:12AM -0600, Scott Moreau wrote:
> We can hit this case if both the preceding calls to
> pixman_region32_contains_point() return false.
When would this happen? Monitor hot-unplug? If the cursor can get
outside any output except hot-unplug, we need to fix that, not paper
over it.
Kristian
> ---
> src/compositor.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/src/compositor.c b/src/compositor.c
> index e0e0bee..dc878ad 100644
> --- a/src/compositor.c
> +++ b/src/compositor.c
> @@ -1579,7 +1579,10 @@ clip_pointer_motion(struct weston_input_device *device,
> old_x, old_y, NULL))
> prev = output;
> }
> -
> +
> + if (!prev)
> + return;
> +
> if (!valid) {
> if (x < prev->x)
> *fx = wl_fixed_from_int(prev->x);
> --
> 1.7.7.6
>
> _______________________________________________
> 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