mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 19:40:43 -05:00
pointer/keyboard: Fix segfault once more
If the resource is destroyed before the surface, then we'll kill ourselves. Why can I never seem to write these correctly...
This commit is contained in:
parent
337c69e223
commit
ff8c4b1bcf
@ -225,8 +225,11 @@ keyboard_handle_focus_surface_destroy (struct wl_listener *listener, void *data)
|
|||||||
wl_list_remove (&keyboard->focus_surface_listener.link);
|
wl_list_remove (&keyboard->focus_surface_listener.link);
|
||||||
keyboard->focus_surface = NULL;
|
keyboard->focus_surface = NULL;
|
||||||
|
|
||||||
wl_list_remove (&keyboard->focus_resource_listener.link);
|
if (keyboard->focus_resource)
|
||||||
keyboard->focus_resource = NULL;
|
{
|
||||||
|
wl_list_remove (&keyboard->focus_resource_listener.link);
|
||||||
|
keyboard->focus_resource = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -63,8 +63,11 @@ pointer_handle_focus_surface_destroy (struct wl_listener *listener, void *data)
|
|||||||
wl_list_remove (&pointer->focus_surface_listener.link);
|
wl_list_remove (&pointer->focus_surface_listener.link);
|
||||||
pointer->focus_surface = NULL;
|
pointer->focus_surface = NULL;
|
||||||
|
|
||||||
wl_list_remove (&pointer->focus_resource_listener.link);
|
if (pointer->focus_resource)
|
||||||
pointer->focus_resource = NULL;
|
{
|
||||||
|
wl_list_remove (&pointer->focus_resource_listener.link);
|
||||||
|
pointer->focus_resource = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user