From ee10ce7bab1ac4009cf534702a65d4bf80f736cf Mon Sep 17 00:00:00 2001 From: David Vanderson Date: Mon, 18 May 2026 09:06:29 -0400 Subject: [PATCH] build: fix nulls when not using glfw --- build.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.zig b/build.zig index bf566dc6..583041ec 100644 --- a/build.zig +++ b/build.zig @@ -170,7 +170,7 @@ pub fn build(b: *std.Build) !void { } var glfw_linux_display: ?GlfwLinuxDisplay = null; - if (back_to_build.? == .glfw) { + if (back_to_build != null and back_to_build.? == .glfw) { glfw_linux_display = .{ .x11 = b.option(bool, "glfw_x11", "Use X11 on Linux for GLFW backend") orelse true, .wayland = b.option(bool, "glfw_wayland", "Use Wayland on Linux for GLFW backend") orelse true, @@ -834,8 +834,8 @@ pub fn buildBackend(backend: Backend, test_dvui_and_app: bool, dvui_opts_in: Dvu .{ .target = target, .optimize = optimize, - .x11 = dvui_opts.glfw_linux_display.?.x11, - .wayland = dvui_opts.glfw_linux_display.?.wayland, + .x11 = if (dvui_opts.glfw_linux_display) |gld| gld.x11 else null, + .wayland = if (dvui_opts.glfw_linux_display) |gld| gld.wayland else null, }, ); -- knotmirror 0.0.1