From 2bbaa77891d1094bda2a42c0cc3663245c634c2b Mon Sep 17 00:00:00 2001 From: Pierre Tachoire Date: Tue, 16 Jan 2024 11:47:23 +0100 Subject: [PATCH] window: document is null by default --- src/html/window.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/html/window.zig b/src/html/window.zig index 346e8e06..2ff7557c 100644 --- a/src/html/window.zig +++ b/src/html/window.zig @@ -7,7 +7,7 @@ const parser = @import("../netsurf.zig"); pub const Window = struct { pub const mem_guarantied = true; - document: *parser.Document = undefined, + document: ?*parser.Document = null, target: []const u8, pub fn create(target: ?[]const u8) Window { @@ -32,7 +32,7 @@ pub const Window = struct { return self; } - pub fn get_document(self: *Window) *parser.Document { + pub fn get_document(self: *Window) ?*parser.Document { return self.document; }