summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2023-12-27 20:15:57 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2023-12-27 20:15:57 +0000
commit605bf21ff225c68d21577a94d423e9ec16158cdb (patch)
tree414a319d7947a153c277a3bd55e2c19ac2926d83
parentbdf8e614af34ba1eaa8243d3a818c8546cb21812 (diff)
Do not use NULL window, GitHub issue 3747.
-rw-r--r--input.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/input.c b/input.c
index f49964d4..9b0c9306 100644
--- a/input.c
+++ b/input.c
@@ -2287,16 +2287,19 @@ input_dcs_dispatch(struct input_ctx *ictx)
const u_int prefixlen = (sizeof prefix) - 1;
long long allow_passthrough = 0;
#ifdef ENABLE_SIXEL
- struct window *w = wp->window;
+ struct window *w;
struct sixel_image *si;
#endif
if (wp == NULL)
return (0);
+ w = wp->window;
+
if (ictx->flags & INPUT_DISCARD) {
log_debug("%s: %zu bytes (discard)", __func__, len);
return (0);
}
+
#ifdef ENABLE_SIXEL
if (buf[0] == 'q') {
si = sixel_parse(buf, len, w->xpixel, w->ypixel);