diff options
author | Dima Ryazanov <dima@gmail.com> | 2013-11-15 02:01:18 -0800 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-12-03 15:54:44 -0800 |
commit | e5a320837319ed91868b9e4311150527847db9f4 (patch) | |
tree | e4c79f599e66911cb4e14f0bded0c780e7d6cd1f /src | |
parent | 767d891c35f396cb90b298e0ae782ce80a0ad6c8 (diff) |
Set the view to NULL when unmapping an X11 window
Fixes a crash caused by accessing a deleted view in weston_wm_window_schedule_repaint. It can be easily reproduced by switching between menus in Firefox.
Signed-off-by: Dima Ryazanov <dima@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/xwayland/window-manager.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c index b2776a0a..5ee94800 100644 --- a/src/xwayland/window-manager.c +++ b/src/xwayland/window-manager.c @@ -902,6 +902,7 @@ weston_wm_handle_unmap_notify(struct weston_wm *wm, xcb_generic_event_t *event) wl_list_remove(&window->surface_destroy_listener.link); window->surface = NULL; window->shsurf = NULL; + window->view = NULL; xcb_unmap_window(wm->conn, window->frame_id); } @@ -2028,6 +2029,7 @@ surface_destroy(struct wl_listener *listener, void *data) Don't try to use it later. */ window->shsurf = NULL; window->surface = NULL; + window->view = NULL; } static struct weston_wm_window * |