render: csd: assert surfaces exist before trying to use them

This commit is contained in:
Daniel Eklöf 2020-03-03 18:24:31 +01:00
parent 09bb9bef33
commit da91a9de4b
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -942,6 +942,9 @@ render_csd(struct terminal *term)
struct wl_surface *surf = term->window->csd.surface[i];
struct wl_subsurface *sub = term->window->csd.sub_surface[i];
assert(surf != NULL);
assert(sub != NULL);
if (width == 0 || height == 0) {
/* CSD borders aren't rendered in maximized mode */
assert(term->window->is_maximized || term->window->is_fullscreen);