diff options
author | Greg V <greg@unrelenting.technology> | 2018-11-08 00:27:04 +0300 |
---|---|---|
committer | Daniel Stone <daniels@collabora.com> | 2019-02-16 09:38:34 +0000 |
commit | dce10bd1416adecca8cca8bab1d1b8e5fc09f791 (patch) | |
tree | 99d70c0f5ad4cb4514ba501a4e33a1c493089202 /xwayland | |
parent | 4253f2357686e7bb2d44fd9259ea21306060a6a6 (diff) | |
download | weston-dce10bd1416adecca8cca8bab1d1b8e5fc09f791.tar.gz |
xwm: fix resize grab related crash
This crash was happening *during resizing* of an xwayland window that was destroyed.
Discovered by: John Good @archiesix
[@daniels: Moved tests below declarations.]
Diffstat (limited to 'xwayland')
-rw-r--r-- | xwayland/window-manager.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c index ccdae57f..77260b0f 100644 --- a/xwayland/window-manager.c +++ b/xwayland/window-manager.c @@ -2661,11 +2661,16 @@ static void send_configure(struct weston_surface *surface, int32_t width, int32_t height) { struct weston_wm_window *window = get_wm_window(surface); - struct weston_wm *wm = window->wm; - struct theme *t = window->wm->theme; + struct weston_wm *wm; + struct theme *t; int new_width, new_height; int vborder, hborder; + if (!window || !window->wm) + return; + wm = window->wm; + t = wm->theme; + if (window->decorate && !window->fullscreen) { hborder = 2 * t->width; vborder = t->titlebar_height + t->width; |