window: document is null by default

This commit is contained in:
Pierre Tachoire
2024-01-16 11:47:23 +01:00
parent 5362fcc7b4
commit 2bbaa77891

View File

@@ -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;
}