Commit d06bdb4
committed
fix(ghostty): make GhosttyTerminal.free() idempotent
ghostty 1.3's libghostty-vt dispatches effect callbacks via an
indirect call through the function table. Calling free() twice on
the same instance (e.g. manual wasmTerm.free() followed by
term.dispose()) drove ghostty_terminal_free into freed memory and
surfaced as a call_indirect signature mismatch on the second call.
Gate on this.handle at entry and zero it after the free.
Recovers the two #141 regression tests that started failing after
the merge to ghostty 1.3.1 parent 3836409 commit d06bdb4
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1056 | 1056 | | |
1057 | 1057 | | |
1058 | 1058 | | |
| 1059 | + | |
1059 | 1060 | | |
1060 | 1061 | | |
1061 | 1062 | | |
| |||
1072 | 1073 | | |
1073 | 1074 | | |
1074 | 1075 | | |
| 1076 | + | |
1075 | 1077 | | |
1076 | 1078 | | |
1077 | 1079 | | |
| |||
0 commit comments