Merge pull request #8107 from benutzer193/master

Fix #8081 [Wayland+Vulkan] Core Dump in wl_egl_window_resize
This commit is contained in:
Twinaphex 2019-01-28 13:09:09 +01:00 committed by GitHub
commit 158cec17fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -657,8 +657,11 @@ static void handle_toplevel_config(void *data, struct xdg_toplevel *toplevel,
wl->width = width; wl->width = width;
wl->height = height; wl->height = height;
} }
wl_egl_window_resize(wl->win, width, height, 0, 0); if (wl->win)
wl_egl_window_resize(wl->win, width, height, 0, 0);
else
wl->win = wl_egl_window_create(wl->surface, wl->width * wl->buffer_scale, wl->height * wl->buffer_scale);
wl->configured = false; wl->configured = false;
} }
@ -724,7 +727,10 @@ static void handle_zxdg_toplevel_config(void *data, struct zxdg_toplevel_v6 *top
wl->height = height; wl->height = height;
} }
wl_egl_window_resize(wl->win, width, height, 0, 0); if (wl->win)
wl_egl_window_resize(wl->win, width, height, 0, 0);
else
wl->win = wl_egl_window_create(wl->surface, wl->width * wl->buffer_scale, wl->height * wl->buffer_scale);
wl->configured = false; wl->configured = false;
} }