commit d1e3b055774c0f0999d9f6f929ff87e96850bc50 parent 031a58bd8c7d1361a45a3fce29153b287897238b Author: hhvn <dev@hhvn.uk> Date: Sun, 28 Nov 2021 23:03:16 +0000 ui.c: allow window to be NULL in ui_strlenc Diffstat:
M | ui.c | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui.c b/ui.c @@ -674,7 +674,7 @@ ui_strlenc(struct Window *window, char *s, int *lines) { if ((*s & 0xC0) != 0x80) cc++; ret++; - if (cc == window->w) { + if (window && cc == window->w) { lc++; cc = 0; }