mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-14 05:46:17 +00:00
Allow startup without $HOME writable
Fixes #3202 Two changes to get here: 1. Do not fail startup if crash reporting initialization fails. This is a non-critical feature and should not prevent the terminal from starting. 2. Avoid freeing Sentry transport on error path. This segfaults. Upstream issue will be reported separately.
This commit is contained in:
@@ -81,7 +81,11 @@ fn initThread(gpa: Allocator) !void {
|
||||
const alloc = arena.allocator();
|
||||
|
||||
const transport = sentry.Transport.init(&Transport.send);
|
||||
errdefer transport.deinit();
|
||||
// This will crash if the transport was never used so we avoid
|
||||
// that for now. This probably leaks some memory but it'd be very
|
||||
// small and a one time cost. Once this is fixed upstream we can
|
||||
// remove this.
|
||||
//errdefer transport.deinit();
|
||||
|
||||
const opts = sentry.c.sentry_options_new();
|
||||
errdefer sentry.c.sentry_options_free(opts);
|
||||
|
Reference in New Issue
Block a user