url-mode: urls_render(): early exit when URL list is empty

This commit is contained in:
Daniel Eklöf 2021-02-07 16:05:02 +01:00
parent 9ee392dc8c
commit 24263412dc
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -474,6 +474,9 @@ urls_render(struct terminal *term)
struct wl_window *win = term->window;
struct wayland *wayl = term->wl;
if (tll_length(win->term->urls) == 0)
return;
xassert(tll_length(win->urls) == 0);
tll_foreach(win->term->urls, it) {
struct wl_surface *surf = wl_compositor_create_surface(wayl->compositor);