setting the focused view shouldn't crash the compositor

This commit is contained in:
Squibid 2025-12-05 20:39:33 -05:00
parent 98dbdc1570
commit 63109e07da
Signed by: squibid
GPG key ID: BECE5684D3C4005D

View file

@ -111,6 +111,11 @@ pub fn set_focused(L: *zlua.Lua) i32 {
return 1;
}
if (view_id == null) {
L.pushNil();
return 1;
}
if(server.root.viewById(@intCast(view_id.?))) |view| {
view.setFocused();
L.pushNil();