Fix MailMailButton nil errors and bump to 1.4.8

- Fix MailMailButton nil errors in SendMailFrame_CanSend and sendmail_clear
- Keep a safe reference to the original Send Mail button
- Add fallback handling for MailSubjectEditBox
- Improve compatibility with UI/mailbox modifications
- Update version to 1.4.8
- Update README and audit documentation
This commit is contained in:
2026-09-14 06:51:49 +00:00
parent 682e843d0e
commit 0853d3854c
4 changed files with 192 additions and 7 deletions
+7 -1
View File
@@ -17,6 +17,12 @@ Target: Turtle WoW 1.18.x / Octo client.
- **Calendar tooltip:** disabled/empty calendar days no longer concatenate a nil/stale `mails` value.
- **OnUpdate rebinding:** `TurtleMail:init()` binds the original `on_update` function before the compatibility file loads; the patch explicitly rebinds the frame script so the safer handler is actually used.
## Fixed in 1.4.8
- **`MailMailButton` nil crash:** upstream stores the real `SendMailMailButton` in a loose global named `MailMailButton`, then replaces the Blizzard global with a proxy table. If the saved global is missing or another UI addon changes it, `SendMailFrame_CanSend()` and `sendmail_clear()` crash while calling `Enable()` / `Disable()`. The compatibility layer now preserves a strong reference to the real button before the proxy swap, restores it when the mailbox opens, replaces the fragile CanSend hook, and uses a guarded clear routine.
- **Paired subject edit-box hardening:** the same proxy pattern is used for `MailSubjectEditBox`; the real edit box is now preserved and restored alongside the send button to avoid the equivalent follow-up failure.
## Remaining architectural risks upstream
These are intentionally not rewritten in the compatibility layer because changing them would be much more invasive and could alter mail behavior:
@@ -38,4 +44,4 @@ The compatibility build was tested in-game on Turtle WoW 1.18.x and the reported
## Status
**1.4.6 is the current stable release.** The fixes remain isolated in `TurtleMailFix.lua` so upstream code stays easy to compare and future upstream changes remain easier to merge.
**1.4.8 is the current stable release.** The fixes remain isolated in `TurtleMailFix.lua` so upstream code stays easy to compare and future upstream changes remain easier to merge.