diff options
author | Andrew Engelbrecht <sudoman@ninthfloor.org> | 2014-12-02 12:18:44 -0500 |
---|---|---|
committer | Bryce Harrington <bryce@osg.samsung.com> | 2015-01-15 20:05:42 -0800 |
commit | 6c7356d5895288af2d75b344c629e40ddeb7953c (patch) | |
tree | 601343fb1eaa7fc68ebd6da534c95a0d0d3f94b9 | |
parent | b90f732e584fb1c3d7dbfd2a7550111e14200ca6 (diff) |
xwm: fix a crash in handle_state
To produce the bug, build and run: (you don't need the game data to test)
https://github.com/clintbellanger/flare-engine/
$ mv ~/.config/flare ~/.config/flare.bak
$ ./flare # click 'configure', set full screen mode then click 'ok'
# weston will crash and dump core.
[Pekka: edited the commit message]
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-rw-r--r-- | xwayland/window-manager.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c index 76b1e218..06f47705 100644 --- a/xwayland/window-manager.c +++ b/xwayland/window-manager.c @@ -1327,7 +1327,9 @@ weston_wm_window_handle_state(struct weston_wm_window *window, WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT, 0, NULL); } else { - shell_interface->set_toplevel(window->shsurf); + if (window->shsurf) + shell_interface->set_toplevel(window->shsurf); + window->width = window->saved_width; window->height = window->saved_height; if (window->frame) |