wayland backend: fix width/height == 0 check

We cannot handle just one of the two being NULL later down the road
(e.g. divide by zero in matrix projection code),
just ignore any such configure request.

Found through static analysis
This commit is contained in:
Dominique Martinet 2018-06-30 11:08:49 +09:00
parent 4cc4412481
commit 1940c6bbd9
1 changed files with 1 additions and 1 deletions

View File

@ -220,7 +220,7 @@ static void xdg_toplevel_handle_configure(void *data, struct zxdg_toplevel_v6 *x
struct wlr_wl_output *output = data;
assert(output && output->xdg_toplevel == xdg_toplevel);
if (width == 0 && height == 0) {
if (width == 0 || height == 0) {
return;
}
// loop over states for maximized etc?