From 0595606617f4f7e3627b7188e7c2f93fe8b886b1 Mon Sep 17 00:00:00 2001 From: lmp Date: Wed, 13 Nov 2024 14:03:45 +0100 Subject: [PATCH] lib: fix compile error in `event.b.v` --- lib/event.b.v | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/event.b.v b/lib/event.b.v index 3422821..44e0aa4 100644 --- a/lib/event.b.v +++ b/lib/event.b.v @@ -190,9 +190,12 @@ pub fn (mut e Events) send(ev Event) ! { } analyse.max('${@MOD}.${@STRUCT}.queue.len', e.queue.len + 1) if e.state == .record { + window := e.shy.window(ev.window_id) or { + return error('${@STRUCT}.${@FN}: could not get window (${ev.window_id}): ${err}') + } e.recorded << RecordedEvent{ event: ev - frame: e.shy.window(ev.window_id) or { 0 }.state.frame + frame: window.state.frame } } if e.queue.len < e.queue.cap {