mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
initialize viewport pin to avoid undefined node in tracked pin
No clue if this ever causes issues, but it's annoying when trying to printf debug the viewport pins results in a segault from trying to deref an undefined pointer
This commit is contained in:
@ -244,6 +244,7 @@ pub fn init(
|
||||
|
||||
// We always track our viewport pin to ensure this is never an allocation
|
||||
const viewport_pin = try pool.pins.create();
|
||||
viewport_pin.* = .{ .node = page_list.first.? };
|
||||
var tracked_pins: PinSet = .{};
|
||||
errdefer tracked_pins.deinit(pool.alloc);
|
||||
try tracked_pins.putNoClobber(pool.alloc, viewport_pin, {});
|
||||
|
Reference in New Issue
Block a user