diff options
author | Jimmy Ohn <yongjin.ohn@lge.com> | 2020-07-01 19:11:52 +0900 |
---|---|---|
committer | Jimmy Ohn <yongjin.ohn@lge.com> | 2020-07-01 19:16:13 +0900 |
commit | f7f8f5f1a87dd697ad6de74a885493bcca920cde (patch) | |
tree | 35b1c18100c4a53290b0ba3c9c144effd916ee29 | |
parent | e55c86a16751f58577195cf76ec7f5c6a106f3bd (diff) | |
download | weston-f7f8f5f1a87dd697ad6de74a885493bcca920cde.tar.gz |
xwayland/window-manager: add a NULL check to fail when frame_create fails
This adds a NULL check to fail when frame_create fails. This can happen
crash in frame_resize_inside function if frame is NULL.
-rw-r--r-- | xwayland/window-manager.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c index 747bf363..de868218 100644 --- a/xwayland/window-manager.c +++ b/xwayland/window-manager.c @@ -1082,6 +1082,10 @@ weston_wm_window_create_frame(struct weston_wm_window *window) window->frame = frame_create(window->wm->theme, window->width, window->height, buttons, window->name, NULL); + + if (!window->frame) + return; + frame_resize_inside(window->frame, window->width, window->height); weston_wm_window_get_frame_size(window, &width, &height); |