Skip to content

Commit b06910c

Browse files
committed
fix double dereference
1 parent c9402fa commit b06910c

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/browser/browser.zig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ pub const Page = struct {
423423
// replace the user context document with the new one.
424424
try session.env.setUserContext(.{
425425
.document = html_doc,
426-
.http_client = @ptrCast(&self.session.http_client),
426+
.http_client = @ptrCast(self.session.http_client),
427427
});
428428

429429
// browse the DOM tree to retrieve scripts
@@ -625,7 +625,6 @@ pub const Page = struct {
625625
return arr.items;
626626
}
627627

628-
629628
fn fetchScript(self: *const Page, s: *const Script) !void {
630629
const arena = self.arena;
631630

src/main.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ pub fn main() !void {
9090
defer loop.deinit();
9191

9292
// browser
93-
var browser = Browser.init(alloc, &loop);
93+
var browser = try Browser.init(alloc, &loop);
9494
defer browser.deinit();
9595

9696
var session = try browser.newSession({});

0 commit comments

Comments
 (0)