mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-09 05:33:58 -04:00
render: csd: assert surfaces exist before trying to use them
This commit is contained in:
parent
09bb9bef33
commit
da91a9de4b
1 changed files with 3 additions and 0 deletions
3
render.c
3
render.c
|
|
@ -942,6 +942,9 @@ render_csd(struct terminal *term)
|
||||||
struct wl_surface *surf = term->window->csd.surface[i];
|
struct wl_surface *surf = term->window->csd.surface[i];
|
||||||
struct wl_subsurface *sub = term->window->csd.sub_surface[i];
|
struct wl_subsurface *sub = term->window->csd.sub_surface[i];
|
||||||
|
|
||||||
|
assert(surf != NULL);
|
||||||
|
assert(sub != NULL);
|
||||||
|
|
||||||
if (width == 0 || height == 0) {
|
if (width == 0 || height == 0) {
|
||||||
/* CSD borders aren't rendered in maximized mode */
|
/* CSD borders aren't rendered in maximized mode */
|
||||||
assert(term->window->is_maximized || term->window->is_fullscreen);
|
assert(term->window->is_maximized || term->window->is_fullscreen);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue